using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.Model.Inquiry;
|
using CY.Infrastructure.Common;
|
using CY.BLL.Inquiry;
|
using CY.WebForm.Pages.front;
|
using CY.Model;
|
namespace CY.WebForm.Pages.business
|
{
|
public partial class InsideInquiry : BasePage
|
{
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
|
if (Request["sumit"] != null)
|
{
|
string result = string.Empty;
|
int pageIndex = 1;
|
int pageSize = 5;
|
int orderType = -1;
|
string firmName = string.Empty;
|
string selectProvince = string.Empty;
|
string selectCity = string.Empty;
|
string selectCounty = string.Empty;
|
if (Request["hidPageIndex"] != null)
|
pageIndex = Request["hidPageIndex"].ToString().ToInt32().Value;
|
if (Request["orderType"] != null)
|
orderType = Request["orderType"].ToString().ToInt32().Value;
|
if (Request["firmName"] != null)
|
firmName = Request["firmName"].ToString();
|
if (Request["selectProvince"] != null)
|
selectProvince = Request["selectProvince"].ToString();
|
if (Request["selectCity"] != null)
|
selectCity = Request["selectCity"].ToString();
|
if (Request["selectCounty"] != null)
|
selectCounty = Request["selectCounty"].ToString();
|
InquiryCommonModel model = InquiryOnLine.GetInquiryCommonModel();
|
string xmlStr = InquiryBLL.GetInquiryCommonModelXMLStr(model);
|
xmlStr = SerializationHelper.EncryptDES(xmlStr, "ssssssss");
|
int index = xmlStr.Length / 2;
|
string xmlStr1 = xmlStr.Substring(0, index);
|
string xmlStr2 = xmlStr.Substring(index, xmlStr.Length - index);
|
Utils.WriteCookie("InsideInquiryRecord1", xmlStr1);
|
Utils.WriteCookie("InsideInquiryRecord2", xmlStr2);
|
InquiryBLL _inquiryBLL = new InquiryBLL();
|
int pageCount = 0;
|
Guid customerId = Guid.Empty;
|
if (Request["selCustomer"] != null)
|
{
|
string customerIdStr = Request["selCustomer"].ToString();
|
if (customerIdStr != "-1")
|
{
|
customerId = Guid.Parse(customerIdStr);
|
}
|
else
|
{
|
customerId = Guid.Empty;
|
}
|
}
|
IList<InquiryResultModel> inquiryResultList = _inquiryBLL.GetInquiryResultListByInside(model,CurrentUser.MemberId, customerId,orderType,firmName,selectProvince,selectCity,selectCounty,pageIndex, pageSize, ref pageCount);
|
string jsonStr = JsonHelper.GetJsonStringByObject(inquiryResultList);
|
result = "{ pageCount:" + pageCount + ",inquiryList:" + jsonStr + "}";
|
Response.Write(result);
|
Response.End();
|
}
|
}
|
}
|
}
|