/// <summary> /// 绑定要修改数据 /// </summary> /// <param name="tid"></param> private void bind() { tid = Utils.GetInt(Utils.GetQueryStringValue("tid")); if (tid > 0) { csModel = csBll.GetModel(tid, this.CurrentUserCompanyID); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string type = context.Request.QueryString["type"]; string id = context.Request.QueryString["id"]; //登录公司ID EyouSoft.SSOComponent.Entity.UserInfo userModel = EyouSoft.Security.Membership.UserProvider.GetUser(); //如果公司ID为0表示没有公司登录 并返回false if (userModel == null) { context.Response.Write("{Islogin:false}"); return; } if (type != null) { EyouSoft.BLL.PlanStruture.TravelAgency travelbll = new EyouSoft.BLL.PlanStruture.TravelAgency(); if (type == "Delete") { if (id != null && id != "") { bool b = travelbll.DelTravelAgency(id); if (b) { context.Response.Write("OK"); } else { context.Response.Write("Error"); } } } if (type == "GetInfo") { //声明操作对象 EyouSoft.BLL.CompanyStructure.CompanySupplier bll = new EyouSoft.BLL.CompanyStructure.CompanySupplier(); EyouSoft.Model.CompanyStructure.CompanySupplier companyModel = bll.GetModel(Utils.GetInt(id), userModel.CompanyID); string returnStr = "{0}||{1}||{2}||{3}"; if (companyModel != null) { if (companyModel.SupplierContact != null && companyModel.SupplierContact.Count > 0) { returnStr = string.Format(returnStr, companyModel.SupplierContact[0].ContactName, companyModel.SupplierContact[0].ContactTel, companyModel.Commission.ToString("0.00"), companyModel.LicenseKey); } else { returnStr = string.Format(returnStr, "", "", companyModel.Commission.ToString("0.00"), companyModel.LicenseKey); } } context.Response.Write(returnStr); } } }
/// <summary> /// 删除地接 /// </summary> /// <param name="TravelId">安排地接编号</param> /// <returns></returns> public bool DelTravelAgency(string TravelId) { EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo modelTravel = GetTravelModel(TravelId); if (dal.DeletTravelModel(TravelId)) { //加日志 //AddSysLog("删除"); //维护地接社交易数量 if (modelTravel != null) { EyouSoft.BLL.CompanyStructure.CompanySupplier bllSuplier = new EyouSoft.BLL.CompanyStructure.CompanySupplier();// EyouSoft.BLL.CompanyStructure.CompanySupplier(); EyouSoft.Model.CompanyStructure.CompanySupplier Model = bllSuplier.GetModel(modelTravel.TravelAgencyID, modelTravel.CompanyId); if (Model != null && Model.Id > 0) { EyouSoft.BLL.UtilityStructure.Utility idal = new EyouSoft.BLL.UtilityStructure.Utility(); idal.ServerTradeCount(new int[] { Model.Id }); } //重新计算团队支出 EyouSoft.BLL.UtilityStructure.Utility u = new EyouSoft.BLL.UtilityStructure.Utility(); //价格维护 u.CalculationTourOut(modelTravel.TourId, null); #region LGWR EyouSoft.Model.EnumType.TourStructure.TourType? tourType = new EyouSoft.BLL.TourStructure.Tour().GetTourType(modelTravel.TourId); Model.EnumType.CompanyStructure.SysPermissionClass mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散拼计划; if (tourType != null && tourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_团队计划; } EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + mokuai.ToString() + "删除了地接安排,安排编号:" + modelTravel.ID + ",计划编号为:" + modelTravel.TourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "删除地接安排"; logInfo.ModuleId = mokuai; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(true); } } return(false); }
protected void rpt_area_ItemDataBound(object sender, RepeaterItemEventArgs e) { EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo item = e.Item.DataItem as EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo; EyouSoft.BLL.CompanyStructure.CompanySupplier bll = new EyouSoft.BLL.CompanyStructure.CompanySupplier(); EyouSoft.Model.CompanyStructure.CompanySupplier companyModel = bll.GetModel(item.TravelAgencyID, CurrentUserCompanyID); Literal lt_cName = e.Item.FindControl("lt_cName") as Literal; Literal lt_cTel = e.Item.FindControl("lt_cTel") as Literal; Literal lt_cFax = e.Item.FindControl("lt_cFax") as Literal; if (companyModel != null && companyModel.SupplierContact.Count > 0) { lt_cName.Text = companyModel.SupplierContact[0].ContactName; lt_cTel.Text = companyModel.SupplierContact[0].ContactTel; lt_cFax.Text = companyModel.SupplierContact[0].ContactFax; } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(tourId); if (model != null) { #region 页面控件赋值 //出团日期 LeaveDate = model.LDate.ToString("yyyy-MM-dd"); //出发交通 lblBegin = model.LTraffic; //组团社 this.txtZutuanName.Text = model.BuyerCName; //联系信息 EyouSoft.BLL.CompanyStructure.CompanySupplier supplierBll = new EyouSoft.BLL.CompanyStructure.CompanySupplier(); EyouSoft.Model.CompanyStructure.CompanySupplier companyModel = supplierBll.GetModel(model.BuyerCId, SiteUserInfo.CompanyID); if (companyModel != null) { if (companyModel.SupplierContact != null && companyModel.SupplierContact.Count > 0) { this.txtIncomeMan.Text = companyModel.SupplierContact[0].ContactName; this.txtFax.Text = companyModel.SupplierContact[0].ContactFax; } } //集合时间 lblGatheredDate.Text = model.GatheringTime; //送团人 if (model.SentPeoples != null && model.SentPeoples.Count > 0) { this.txtOffName.Text = model.SentPeoples[0].OperatorName; } this.txtAddress.Text = model.GatheringPlace; //返程交通 lblEnd = model.RTraffic; if (model.TourNormalInfo != null) { //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //行程安排 if (model.TourNormalInfo.Plans != null) { this.listCount = model.TourNormalInfo.Plans.Count; tdCount = model.TourNormalInfo.Plans.Count; this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); } } //人数 #region 人数And结算价 if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money); this.lblAdult.Text = number; } else { this.lblAdult.Text = model.PlanPeopleNumber.ToString(); } #endregion //团队类型 this.txtTourType.Text = model.TourType.ToString(); //包含项目 this.rptProject.DataSource = model.Services; this.rptProject.DataBind(); #endregion } }