using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.Infrastructure.Common;
|
using CY.Model.Inquiry;
|
using CY.BLL;
|
using CY.Model;
|
using CY.BLL.Inquiry;
|
namespace CY.WebForm.Pages.front
|
{
|
public partial class InquiryDetail : FrontBasePage
|
{
|
EC_MemberBasicBLL _eC_MemberBasicBLL = new EC_MemberBasicBLL();
|
PaperSizeDetailBLL _paperSizeDetailBLL = new PaperSizeDetailBLL();
|
PaperInfoBLL _paperInfoBLL = new PaperInfoBLL();
|
BrandInfoBLL _brandInfoBLL = new BrandInfoBLL();
|
InquiryBLL _inquiryBLL = new InquiryBLL();
|
RecordInfoBLL _recordInfoBLL = new RecordInfoBLL();
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
string firmId = string.Empty;
|
if (Request["fid"] != null && Request["fid"] != "")
|
{
|
firmId = Request["fid"].ToString();
|
Guid o_firmId = firmId.ToGuid2();
|
EC_MemberBasic memberModel = _eC_MemberBasicBLL.GetMemberByMemberId(o_firmId);
|
this.lblFirmName.Text = memberModel.Name;
|
this.lblPhone.Text = memberModel.EC_MemberExtendMode.PhoneNum;
|
this.lblQQ.Text = memberModel.EC_MemberExtendMode.QQ;
|
InquiryCommonModel model = InquiryBLL.GetInquiryCommonModel();
|
if (model != null)
|
{
|
this.hidPrintCount.Value = model.PrintCount.ToString();
|
this.hidPrintTypeId.Value = model.PrintTypeId.ToString();
|
this.lblPrintTypeName.Text = model.PrintTypeName;
|
this.lblPrintMode.Text = model.PrintModeName;
|
this.lblPrintCount.Text = model.PrintCountName;
|
this.lblPrintDemand.Text = model.PrintDemand;
|
this.lblAfterWorksDemand.Text = model.AfterWorksDemand;
|
this.lblDeliveryMode.Text = model.DeliveryModeName;
|
this.lblBillMode.Text = model.BillModeName;
|
this.lblRemarks.Text = model.Remarks;
|
Guid memberId = Guid.Empty;
|
if (CurrentUser != null)
|
{
|
memberId = CurrentUser.MemberId;
|
}
|
IList<CY.Model.InquiryDetail> list = _inquiryBLL.GetInquiryDetailList(model, o_firmId, memberId);
|
this.RepInquiryResultList.DataSource = list;
|
this.RepInquiryResultList.DataBind();
|
|
if (Request["num"] != null)
|
{
|
if (Request["num"].ToString() == "1")
|
{
|
//询价记录保存
|
if (CurrentUser != null)
|
{
|
if (CurrentUser.MemberId != o_firmId)
|
{
|
model.InquiryDetailObj = list[0];
|
Inquiry_RecordInfo rInfo = new Inquiry_RecordInfo();
|
string inquiryStr = InquiryBLL.GetInquiryCommonModelXMLStr(model);
|
rInfo.InquiryPersonId = CurrentUser.MemberId;
|
rInfo.FirmId = o_firmId;
|
rInfo.PrintParameter = inquiryStr;
|
rInfo.PrintTypeId = model.PrintTypeId;
|
rInfo.PrintCount = this.hidPrintCount.Value.ToInt32().Value;
|
rInfo.SysPrice = list[0].TotalPrice;
|
rInfo.OperateTime = DateTime.Now;
|
rInfo.ResultStatus = 0;
|
rInfo.PersonTypeId = 1;
|
_recordInfoBLL.InsertModel(rInfo);
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|