private void Save() { string msg = string.Empty; string txtlevelname = Utils.GetFormValue(txtLevelName.UniqueID); if (string.IsNullOrEmpty(txtlevelname)) { msg += "等级名称不能为空!<br/>"; } if (!string.IsNullOrEmpty(msg)) { Response.Clear(); Response.Write(UtilsCommons.AjaxReturnJson("0", msg)); Response.End(); } EyouSoft.Model.ComStructure.MComLev model = new EyouSoft.Model.ComStructure.MComLev(); model.Name = txtlevelname; model.CompanyId = SiteUserInfo.CompanyId; model.OperatorId = SiteUserInfo.UserId; model.LevType = EyouSoft.Model.EnumType.ComStructure.LevType.其他; if (Id == 0) { if (new EyouSoft.BLL.ComStructure.BComLev().Add(model)) { AjaxResponse(UtilsCommons.AjaxReturnJson("1", "添加成功")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("0", "添加失败")); } } else { model.Id = Id; if (new EyouSoft.BLL.ComStructure.BComLev().Update(model)) { AjaxResponse(UtilsCommons.AjaxReturnJson("1", "修改成功")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("0", "修改失败")); } } }
/// <summary> /// 页面初始化 /// </summary> /// <param name="tourId"></param> private void DataInit(string tourId) { EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MSupplierPublishPrice model = bll.GetSupplyPrice(tourId); if (model != null) { this.hideAdultPrice.Value = Utils.FilterEndOfTheZeroDecimal(model.SettleAdultPrice); this.hideChildPrice.Value = Utils.FilterEndOfTheZeroDecimal(model.SettleChildPrice); IList <EyouSoft.Model.ComStructure.MComLev> sysComLev = new EyouSoft.BLL.ComStructure.BComLev().GetList(SiteUserInfo.CompanyId); if (sysComLev != null) { EyouSoft.Model.ComStructure.MComLev lev = sysComLev.FirstOrDefault(p => p.LevType == EyouSoft.Model.EnumType.ComStructure.LevType.内部结算价); if (lev != null) { this.hidePriceLevelId.Value = lev.Id.ToString(); } } } }
protected void Page_Load(object sender, EventArgs e) { #region 控件设置 this.SellsSelect1.SetTitle = "销售员"; this.SellsSelect1.CallBackFun = "OrderInfoPage.CallBackFun"; this.SellsSelect1.ClientDeptID = this.hideDeptID.ClientID; this.SellsSelect1.ClientDeptName = this.hideDeptName.ClientID; this.PriceStand1.CompanyID = SiteUserInfo.CompanyId; this.PriceStand1.InitMode = false; this.PriceStand1.ShowModel = true; this.CustomerUnitSelect1.CallBack = "OrderInfoPage.CustomerUnitCallBack"; this.CustomerUnitSelect1.IsApply = true; #endregion #region 处理AJAX请求 //获取ajax请求 string doType = Utils.GetQueryStringValue("dotype"); switch (doType) { case "save": Utils.RCWE(PageSave()); break; case "getAmount": Utils.RCWE(GetAmount()); break; case "yanzhengzerenxiaoshou": YanZhengZeRenXiaoShou(); break; default: break; } #endregion if (!IsPostBack) { string tourID = Utils.GetQueryStringValue("tourID"); string orderID = Utils.GetQueryStringValue("orderID"); #region 获得结算价等级 EyouSoft.BLL.ComStructure.BComLev comLevBll = new EyouSoft.BLL.ComStructure.BComLev(); IList <EyouSoft.Model.ComStructure.MComLev> sysComLev = comLevBll.GetList(SiteUserInfo.CompanyId); if (sysComLev != null && sysComLev.Count > 0) { EyouSoft.Model.ComStructure.MComLev peerLevModel = sysComLev.FirstOrDefault(p => p.LevType == EyouSoft.Model.EnumType.ComStructure.LevType.内部结算价); if (peerLevModel != null) { this.hideSettLevelID.Value = peerLevModel.Id.ToString(); } } comLevBll = null; sysComLev = null; #endregion #region 获得留位时间 GetMaxDateTime(); this.txtSaveSeatDate.Attributes.Add("onfocus", "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:'" + this.MaxDateTime + "',minDate:'" + DateTime.Now.AddMinutes(5).ToString("yyyy-MM-dd HH:mm") + "'})"); #endregion //根据ID初始化页面 if (tourID != "") { PageInitForTour(tourID); } if (orderID != "") { PageInitForOrder(orderID); } if (tourID == "" && orderID == "") { Utils.ResponseGoBack(); } /* * 报名途径 * 系统后台报名:确认成交(已成交)、留位(留位) * 分销商平台报名:提交订单(未处理) * 分销商平台订单列表可取消未处理状态的订单 * 派团计划保存后订单就是已成交 * * 订单类型 * 未处理:确认成交,同意留位,取消订单 * 已留位:确认成交、继续留位、取消订单 * 留位过期:确认成交,继续留位,取消订单 * 已成交:修改(派团给计调前)或变更(派团后计调后)、取消订单 * 不受理:无操作 */ } }