private void PageInit(string planid) { EyouSoft.BLL.PlanStructure.BPlan bll = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo mPlan = bll.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.飞机, planid); this.txtsourcename.Text = SiteUserInfo.CompanyName; this.txtname.Text = SiteUserInfo.Name; this.txttel.Text = SiteUserInfo.Telephone; this.txtfax.Text = SiteUserInfo.Fax; //计调实体 if (mPlan != null) { this.txtunitContactname.Text = mPlan.ContactName; this.txtunitname.Text = mPlan.SourceName; this.txtunittel.Text = mPlan.ContactPhone; this.txtunitfax.Text = mPlan.ContactFax; this.lbCostDesc.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(mPlan.CostDetail); this.lbTotleCost.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(mPlan.Confirmation, ProviderToMoney); this.lbRemark.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(mPlan.Remarks); if (mPlan.PlanLargeTime != null && mPlan.PlanLargeTime.Count > 0) { listCount = mPlan.PlanLargeTime.Count; this.rptlist.DataSource = mPlan.PlanLargeTime; this.rptlist.DataBind(); } //this.lbRouteName.Text = mPlan.RouteName; this.lbTourID.Text = mPlan.TourCode; //this.txtplanName.Text = mPlan.OperatorName; //this.txtcaiwu.Text = mPlan.Accountant; //this.txtshenpi.Text = mPlan.Approver; //this.txtsellname.Text = mPlan.SellerName; } }
protected void InitPage(string planId) { EyouSoft.BLL.PlanStructure.BPlan BLL = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo model = BLL.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.购物, planId); if (model != null) { //地接社名称/联系人 this.txtCompanyName.Text = model.SourceName; this.txtCompanyContactName.Text = model.ContactName; this.txtContact.Text = model.ContactPhone; this.txtFax.Text = model.ContactFax; //公司名、联系人 this.txtSelfName.Text = this.SiteUserInfo.CompanyName; this.txtSelfContactName.Text = this.SiteUserInfo.Name; this.txtSelfContact.Text = this.SiteUserInfo.Telephone; this.txtSelfFax.Text = this.SiteUserInfo.Fax; //线路名称 //this.lbRouteName.Text = model.RouteName; //团号 this.lbTourCode.Text = model.TourCode; //人数 this.lbNum.Text = model.Num.ToString(); //付款方式 this.lbPaymentType.Text = model.PaymentType.ToString(); //返利标准 this.lbServiceStandard.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard); //备注 this.lbCostRemarks.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.Remarks); //签发日期 this.lbDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
/// <summary> /// 计调修改 /// </summary> /// <param name="mdl">计调实体</param> /// <returns>1:修改成功 0:修改失败 -1:领料不足 -2:预控数量不足</returns> public int UpdPlan(MPlanBaseInfo mdl) { if (mdl == null || string.IsNullOrEmpty(mdl.SourceName)) { return(0); } if (!string.IsNullOrEmpty(mdl.SueId) && mdl.SueId.Trim() != "" && (mdl.Type == PlanProject.用车 || mdl.Type == PlanProject.酒店 || mdl.Type == PlanProject.景点 || mdl.Type == PlanProject.其它)) { int UsedNum = 0; int SUNum = dal.GetControlSYNumById(mdl.SueId, mdl.Type, mdl.PlanId, ref UsedNum); if (SUNum + UsedNum < mdl.Num) { return(-2); } } if (mdl.Type != PlanProject.国内游轮 && mdl.Type != PlanProject.涉外游轮) { mdl.DNum = mdl.Num; } var ok = this.dal.AddOrUpdPlan(mdl); if (ok > 0) { //添加操作日志 SysStructure.BSysLogHandle.Insert(string.Format("修改计调编号:{0}、计调类型:{1}的计调项目。", mdl.PlanId, mdl.Type)); } return(ok); }
protected void InitPage(string planId) { EyouSoft.BLL.PlanStructure.BPlan BLL = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo model = BLL.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.其它, planId); if (model != null) { //名称/联系人 this.txtCompanyName.Text = model.SourceName; this.txtCompanyContactName.Text = model.ContactName; this.txtContact.Text = model.ContactPhone; this.txtFax.Text = model.ContactFax; //公司名、联系人 this.txtSelfName.Text = this.SiteUserInfo.CompanyName; this.txtSelfContactName.Text = this.SiteUserInfo.Name; this.txtSelfContact.Text = this.SiteUserInfo.Telephone; this.txtSelfFax.Text = this.SiteUserInfo.Fax; //this.lbRouteName.Text = model.RouteName; this.lbTourCode.Text = model.TourCode; //人数 this.lbNum.Text = model.Num.ToString(); //支付方式 this.lbPaymentType.Text = model.PaymentType.ToString(); //支出项目 this.lbCostDetail.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CostDetail); //结算费用 this.lbConfirmation.Text = UtilsCommons.GetMoneyString(model.Confirmation, ProviderToMoney); //备注 this.lbCostRemarks.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.Remarks); //签发日期 this.lbDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
protected void InitPage(string planId) { EyouSoft.BLL.PlanStructure.BPlan BLL = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo model = BLL.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.酒店, planId); if (model != null) { //地接社名称/联系人 this.txtCompanyName.Text = model.SourceName; this.txtCompanyContactName.Text = model.ContactName; this.txtContact.Text = model.ContactPhone; this.txtFax.Text = model.ContactFax; //公司名、联系人 this.txtSelfName.Text = this.SiteUserInfo.CompanyName; this.txtSelfContactName.Text = this.SiteUserInfo.Name; this.txtSelfContact.Text = this.SiteUserInfo.Telephone; this.txtSelfFax.Text = this.SiteUserInfo.Fax; //线路名称 //this.lbRouteName.Text = model.RouteName; //团号 this.lbTourCode.Text = model.TourCode; //入住时间 this.lbStartDate.Text = model.StartDate.HasValue ? model.StartDate.Value.ToString("yyyy-MM-dd") : ""; //离店时间 this.lbEndDate.Text = model.EndDate.HasValue ? model.EndDate.Value.ToString("yyyy-MM-dd") : ""; //天数 this.lbDays.Text = model.PlanHotel.Days.ToString(); //房型 if (model.PlanHotel.PlanHotelRoomList != null && model.PlanHotel.PlanHotelRoomList.Count > 0) { this.rpt_PlanHotelRoomList.DataSource = model.PlanHotel.PlanHotelRoomList; this.rpt_PlanHotelRoomList.DataBind(); } //付费房数 this.lbNum.Text = model.Num.ToString(); //免费房数 this.lbFreeNumber.Text = model.PlanHotel.FreeNumber.ToString(); //是否含早 this.lbIsMeal.Text = model.PlanHotel.IsMeal.ToString(); //早餐费用 this.lbMealCost.Text = UtilsCommons.GetMoneyString((decimal)model.PlanHotel.MealFrequency * (decimal)model.PlanHotel.MealNumber * model.PlanHotel.MealPrice, ProviderToMoney); //费用明细 this.lbCostDetail.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CostDetail); //费用总额 this.lbConfirmation.Text = UtilsCommons.GetMoneyString(model.Confirmation, ProviderToMoney); //备注 //this.lbCostRemarks.Text = model.ContactName + "/" + model.ContactPhone + "<br/>" + model.Remarks; this.lbCostRemarks.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.Remarks); this.lbDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); ltrZhiFuFangShi.Text = model.PaymentType.ToString(); } }
protected void InitPage(string planId) { EyouSoft.BLL.PlanStructure.BPlan BLL = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo model = BLL.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.涉外游轮, planId); if (model != null) { //名称/联系人 this.txtCompanyName.Text = model.SourceName; this.txtCompanyContactName.Text = model.ContactName; this.txtContact.Text = model.ContactPhone; this.txtFax.Text = model.ContactFax; //公司名、联系人 this.txtSelfName.Text = this.SiteUserInfo.CompanyName; this.txtSelfContactName.Text = this.SiteUserInfo.Name; this.txtSelfContact.Text = this.SiteUserInfo.Telephone; this.txtSelfFax.Text = this.SiteUserInfo.Fax; //线路名称 //this.lbRouteName.Text = model.RouteName; //团号 this.lbTourCode.Text = model.TourCode; //船名 this.lbShipName.Text = model.PlanShip.ShipName; //登船日期 this.lbStartDate.Text = model.StartDate.HasValue ? model.StartDate.Value.ToString("yyyy-MM-dd") : ""; //登船码头 this.lbLoadDock.Text = model.PlanShip.LoadDock; //航行 this.lbLine.Text = model.PlanShip.Line; //停靠景点 this.lbSight.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.PlanShip.Sight); //费用明细 this.lbCostDetail.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CostDetail); //费用总额 this.lbConfirmation.Text = UtilsCommons.GetMoneyString(model.Confirmation, ProviderToMoney); //备注 this.lbCostRemarks.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.Remarks); //游客信息 this.lbCustomerInfo.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CustomerInfo); //登船号 this.lbLoadCode.Text = model.PlanShip.LoadCode; //签发日期 this.lbDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
protected void InitPage(string planId) { EyouSoft.BLL.PlanStructure.BPlan BLL = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo model = BLL.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用车, planId); if (model != null) { //地接社名称/联系人 this.txtCompanyName.Text = model.SourceName; this.txtCompanyContactName.Text = model.ContactName; this.txtContact.Text = model.ContactPhone; this.txtFax.Text = model.ContactFax; //公司名、联系人 this.txtSelfName.Text = this.SiteUserInfo.CompanyName; this.txtSelfContactName.Text = this.SiteUserInfo.Name; this.txtSelfContact.Text = this.SiteUserInfo.Telephone; this.txtSelfFax.Text = this.SiteUserInfo.Fax; //线路名称 //this.lbRouteName.Text = model.RouteName; //团号 this.lbTourCode.Text = model.TourCode; //用车时间 this.lbStartDate.Text = UtilsCommons.SetDateTimeFormart(model.StartDate) + ":" + model.StartTime + " - " + UtilsCommons.SetDateTimeFormart(model.EndDate) + ":" + model.EndTime; //用车类型 this.lbModels.Text = model.PlanCar.VehicleType.ToString(); //车型+人数 this.lblCarType.Text = model.PlanCar.Models + "(" + model.PlanCar.SeatNumber.ToString() + ")"; //用车数量 this.lbNum.Text = model.Num.ToString(); //付款方式 this.lbPaymentType.Text = model.PaymentType.ToString(); //行程 this.lbReceiveJourney.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ReceiveJourney); //费用明细 this.lbCostDetail.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CostDetail); //费用总额 this.lbConfirmation.Text = UtilsCommons.GetMoneyString(model.Confirmation, ProviderToMoney); //备注 this.lbCostRemarks.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.Remarks); //签发日期 this.lbDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
protected void InitPage(string planId) { EyouSoft.BLL.PlanStructure.BPlan BLL = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo model = BLL.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.地接, planId); if (model != null) { //地接社名称/联系人 this.txtCompanyName.Text = model.SourceName; this.txtCompanyContactName.Text = model.ContactName; this.txtContact.Text = model.ContactPhone; this.txtFax.Text = model.ContactFax; //公司名、联系人 this.txtSelfName.Text = this.SiteUserInfo.CompanyName; this.txtSelfContactName.Text = this.SiteUserInfo.Name; this.txtSelfContact.Text = this.SiteUserInfo.Telephone; this.txtSelfFax.Text = this.SiteUserInfo.Fax; //线路名称 //this.lbRouteName.Text = model.RouteName; //团号 this.lbTourCode.Text = model.TourCode; //人数 this.lbPersonNum.Text = model.Num.ToString(); //接团日期 this.lbStartDate.Text = model.StartDate.HasValue ? model.StartDate.Value.ToString("yyyy-MM-dd") : ""; //送团日期 this.lbEndDate.Text = model.EndDate.HasValue ? model.EndDate.Value.ToString("yyyy-MM-dd") : ""; //接待行程 this.lbReceiveJourney.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ReceiveJourney); //服务标准 this.lbServiceStandard.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard); //费用明细 this.lbCostDetail.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CostDetail); //费用总额 this.lbConfirmation.Text = UtilsCommons.GetMoneyString(model.Confirmation, ProviderToMoney); //备注 this.lbCostRemarks.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.Remarks); //游客信息 this.lbCustomerInfo.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CustomerInfo); this.lbDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
private void PageInit(string planid) { EyouSoft.BLL.PlanStructure.BPlan bll = new EyouSoft.BLL.PlanStructure.BPlan(); MPlanBaseInfo mPlan = bll.GetModel(EyouSoft.Model.EnumType.PlanStructure.PlanProject.景点, planid); this.txtsourcename.Text = SiteUserInfo.CompanyName; this.txtname.Text = SiteUserInfo.Name; this.txttel.Text = SiteUserInfo.Telephone; this.txtfax.Text = SiteUserInfo.Fax; //计调实体 if (mPlan != null) { if (mPlan.PlanAttractions != null) { this.lbScenicName.Text = mPlan.PlanAttractions.Attractions; this.lbPeopleCount.Text = (mPlan.PlanAttractions.AdultNumber + mPlan.PlanAttractions.ChildNumber).ToString(); } string s = EyouSoft.Common.UtilsCommons.GetDateString(mPlan.StartDate, ProviderToDate); if (!string.IsNullOrEmpty(mPlan.StartTime)) { s += " " + mPlan.StartTime + "时"; } s += " 至 " + EyouSoft.Common.UtilsCommons.GetDateString(mPlan.EndDate, ProviderToDate); if (!string.IsNullOrEmpty(mPlan.EndTime)) { s += " " + mPlan.EndTime + "时"; } this.lbTime.Text = s; this.lbCostDesc.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(mPlan.CostDetail); this.lbTotleCost.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(mPlan.Confirmation, ProviderToMoney); this.LbRemark.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(mPlan.Remarks); this.txtunitContactname.Text = mPlan.ContactName; this.txtunitname.Text = mPlan.SourceName; this.txtunittel.Text = mPlan.ContactPhone; this.txtunitfax.Text = mPlan.ContactFax; //this.lbRouteName.Text = mPlan.RouteName; this.lbTourID.Text = mPlan.TourCode; } }
/// <summary> /// 获取表单信息 /// </summary> /// <returns></returns> MPlanBaseInfo GetFormInfo() { var anPaiLeiXing = (PlanProject?)Utils.GetEnumValueNull(typeof(PlanProject), Utils.GetFormValue("type")); string tourId = Utils.GetFormValue("TourID"); var uinfo = EyouSoft.Security.Membership.UserProvider.GetUserInfo(); if (!anPaiLeiXing.HasValue) { Utils.RCWE(UtilsCommons.AjaxReturnJson("-1")); } if (string.IsNullOrEmpty(tourId)) { Utils.RCWE(UtilsCommons.AjaxReturnJson("-1")); } MPlanBaseInfo info = null; if (!string.IsNullOrEmpty(AnPaiId)) { info = new BPlan().GetModel(PlanProject.导游, AnPaiId); } if (info == null) { info = new MPlanBaseInfo(); } info.CompanyId = uinfo.CompanyId; info.DeptId = uinfo.DeptId; info.OperatorId = uinfo.UserId; info.OperatorName = uinfo.Name; info.Confirmation = Utils.GetDecimal(Utils.GetFormValue("txt_confirmation")); info.CostDetail = Utils.GetFormValue("txt_costDetail").Trim(); info.IssueTime = DateTime.Now; info.Num = Utils.GetInt(Utils.GetFormValue("txt_num")); info.DNum = Utils.GetDecimal(Utils.GetFormValue("txt_num")); info.PaymentType = (Payment)Utils.GetInt(Utils.GetFormValue("sel_payment")); info.ContactName = Utils.GetFormValue("ContactName"); info.ContactPhone = Utils.GetFormValue("ContactPhone"); info.SourceName = Utils.GetFormValue("txt_sourceName").Trim(); info.SourceId = Utils.GetFormValue("hd_sourceId"); info.TourId = tourId; info.Type = anPaiLeiXing.Value; info.Status = PlanState.已落实; switch (info.Type) { case PlanProject.领料: info.SourceName = Utils.GetFormValue("txt_sourceName"); info.ContactName = Utils.GetFormValue("txt_contactName"); info.PlanGood = new EyouSoft.Model.GovStructure.MGovGoodUse(); info.PlanGood.GoodId = info.SourceId; info.PlanGood.CompanyId = info.CompanyId; info.PlanGood.DeptId = info.DeptId; info.PlanGood.GoodName = Utils.GetFormValue("txt_sourceName"); info.PlanGood.IssueTime = DateTime.Now; info.PlanGood.Number = info.Num; info.PlanGood.Operator = info.OperatorName; info.PlanGood.OperatorId = info.OperatorId; info.PlanGood.PlanId = info.PlanId; info.PlanGood.Price = Utils.GetDecimal(info.CostDetail); info.PlanGood.UserId = Utils.GetFormValue("txt_UserId"); info.PlanGood.UserName = Utils.GetFormValue("txt_contactName"); break; case PlanProject.火车: info.PlanLargeTime = new List <MPlanLargeTime>(); var item = new MPlanLargeTime(); item.PlanId = info.PlanId; item.PayNumber = info.Num; item.FreeNumber = Utils.GetInt(Utils.GetFormValue("txt_freeNumber")); info.PlanLargeTime.Add(item); break; case PlanProject.景点: info.PlanAttractions = new MPlanAttractions(); info.PlanAttractions.PlanId = info.PlanId; info.PlanAttractions.AdultNumber = Utils.GetInt(Utils.GetFormValue("txt_adultNumber")); info.PlanAttractions.ChildNumber = Utils.GetInt(Utils.GetFormValue("txt_childNumber")); break; case PlanProject.涉外游轮: case PlanProject.国内游轮: info.PlanShip = new MPlanShip(); info.PlanShip.PlanId = info.PlanId; info.PlanShip.PlanShipPriceList = new List <MPlanShipPrice>(); var item1 = new MPlanShipPrice(); item1.PlanId = info.PlanId; item1.DNum = Utils.GetDecimal(Utils.GetFormValue("txt_adultNumber")); item1.AdultNumber = Utils.GetInt(Utils.GetFormValue("txt_adultNumber")); item1.AdultNumber = Convert.ToInt32(item1.DNum); item1.ChildNumber = Utils.GetInt(Utils.GetFormValue("txt_childNumber")); info.PlanShip.PlanShipPriceList.Add(item1); info.Num = Convert.ToInt32(info.DNum); break; case PlanProject.酒店: info.PlanHotel = new MPlanHotel(); info.PlanHotel.PlanId = info.PlanId; info.PlanHotel.FreeNumber = Utils.GetInt(Utils.GetFormValue("txt_freeNumber")); break; } return(info); }