public static bool CheckUserName(string userName, int companyId) { EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(); bool result = userBll.IsExists(0, userName, companyId); return(result); }
protected void InitBindAuthor() { EyouSoft.Model.CompanyStructure.ContactPersonInfo Model_ContactPersonInfo = new EyouSoft.Model.CompanyStructure.ContactPersonInfo(); EyouSoft.BLL.CompanyStructure.CompanyUser Bll_CompanyUser = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); int UserID = EyouSoft.Common.Utils.GetInt(Request.QueryString["ID"]); if (!string.IsNullOrEmpty(ID.ToString()) && UserID > 0) { Model_ContactPersonInfo = Bll_CompanyUser.GetUserBasicInfo(UserID); if (Model_ContactPersonInfo != null) { //联系人 this.Lab_Contact.Text = Model_ContactPersonInfo.ContactName.ToString(); //联系电话 this.Lab_Mobile.Text = Model_ContactPersonInfo.ContactTel.ToString(); //传真 this.Lab_Fox.Text = Model_ContactPersonInfo.ContactFax.ToString(); //手机 this.Lab_Phone.Text = Model_ContactPersonInfo.ContactMobile.ToString(); //QQ this.Lab_QQ.Text = Model_ContactPersonInfo.QQ.ToString(); //MsN this.Lab_Msn.Text = Model_ContactPersonInfo.MSN.ToString(); //Email this.Lab_Email.Text = Model_ContactPersonInfo.ContactEmail.ToString(); } } Model_ContactPersonInfo = null; Bll_CompanyUser = null; }
protected void GetContent() { pageindex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); EyouSoft.BLL.CompanyStructure.CompanyUser cuBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); list = cuBll.GetAreaJobsByTourUserID(pagesize, pageindex, ref recordcount, SiteUserInfo.ID); GetJson(); }
protected void Page_Load(object sender, EventArgs e) { csModel = new EyouSoft.Model.CompanyStructure.ContactPersonInfo(); EyouSoft.BLL.CompanyStructure.CompanyUser csBLL = new EyouSoft.BLL.CompanyStructure.CompanyUser(); int OperatorID = Utils.GetInt(Utils.GetQueryStringValue("OperatorID")); csModel = csBLL.GetUserBasicInfo(OperatorID); }
protected void Page_Load(object sender, EventArgs e) { cuBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); if (IsPostBack) { InitBindPwd(); } }
protected void Page_Load(object sender, EventArgs e) { EyouSoft.BLL.CompanyStructure.CompanyUser CompanyUser = null; EyouSoft.Model.CompanyStructure.CompanyUser ModelCompanyUser = new EyouSoft.Model.CompanyStructure.CompanyUser(); string hidMethod = Utils.GetFormValue("hidMethod"); if (hidMethod == "save") { ModelCompanyUser.PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord(); ModelCompanyUser.PassWordInfo.NoEncryptPassword = this.Txt_PassWord.Text; ModelCompanyUser.UserName = Utils.GetFormValue(this.txtUserName.UniqueID); ModelCompanyUser.PersonInfo = new EyouSoft.Model.CompanyStructure.ContactPersonInfo(); ModelCompanyUser.PersonInfo.ContactName = this.Txt_Name.Value; ModelCompanyUser.PersonInfo.ContactSex = (EyouSoft.Model.EnumType.CompanyStructure.Sex)Enum.Parse(typeof(EyouSoft.Model.EnumType.CompanyStructure.Sex), this.ddlSex.SelectedValue); ModelCompanyUser.PersonInfo.JobName = this.Txt_Position.Value; ModelCompanyUser.PersonInfo.ContactTel = this.Txt_Phone.Value; ModelCompanyUser.PersonInfo.ContactFax = this.Txt_Fox.Value; ModelCompanyUser.PersonInfo.ContactMobile = this.Txt_Moblie.Value; ModelCompanyUser.PersonInfo.QQ = this.Txt_QQNumber.Value; ModelCompanyUser.PersonInfo.ContactEmail = this.Txt_Email.Value; ModelCompanyUser.PersonInfo.Remark = this.Txt_Remiks.Value; bool result = true; ModelCompanyUser.ID = SiteUserInfo.ID; ModelCompanyUser.TourCompanyId = SiteUserInfo.TourCompany.TourCompanyId; CompanyUser = new EyouSoft.BLL.CompanyStructure.CompanyUser(); result = CompanyUser.UpdateZuTuan(ModelCompanyUser); MessageBox.ShowAndRedirect(this, result ? "用户信息修改成功!" : "用户信息修改失败!", "/GroupEnd/SystemSetting/AccountManager.aspx"); return; } CompanyUser = new EyouSoft.BLL.CompanyStructure.CompanyUser(); ModelCompanyUser = CompanyUser.GetUserInfo(SiteUserInfo.ID); if (ModelCompanyUser != null) { this.Txt_UserName.Text = ModelCompanyUser.UserName; this.txtUserName.Value = ModelCompanyUser.UserName; this.Txt_Name.Value = ModelCompanyUser.PersonInfo.ContactName; this.Txt_PassWord.Text = ModelCompanyUser.PassWordInfo.NoEncryptPassword; if (this.ddlSex.Items.FindByValue(((int)ModelCompanyUser.PersonInfo.ContactSex).ToString()) != null) { this.ddlSex.Items.FindByValue(((int)ModelCompanyUser.PersonInfo.ContactSex).ToString()).Selected = true; } this.Txt_Position.Value = ModelCompanyUser.PersonInfo.JobName; this.Txt_Phone.Value = ModelCompanyUser.PersonInfo.ContactTel; this.Txt_Fox.Value = ModelCompanyUser.PersonInfo.ContactFax; this.Txt_Moblie.Value = ModelCompanyUser.PersonInfo.ContactMobile; this.Txt_QQNumber.Value = ModelCompanyUser.PersonInfo.QQ; this.Txt_Email.Value = ModelCompanyUser.PersonInfo.ContactEmail; this.Txt_Remiks.Value = ModelCompanyUser.PersonInfo.Remark; } }
/// <summary> /// AJAX请求用户名验证 /// </summary> void ExistsUsername() { bool result = new EyouSoft.BLL.CompanyStructure.CompanyUser().IsExists(0, Utils.GetFormValue("username"), Master.CompanyId); string s = "0"; if (result) { s = "-1"; } ResponseAndClear(s); }
protected void Page_Load(object sender, EventArgs e) { csBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); cBll = new EyouSoft.BLL.CompanyStructure.Customer(); if (!IsPostBack) { cominit();//初使化修改信息 } else { InitSave(); } }
protected void Page_Load(object sender, EventArgs e) { userbll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); if (!IsPostBack) { Datainit(); } else { Save(); Datainit(); } }
/// <summary> /// 获取子系统信息,仅取WEBMASTER修改子系统时使用的数据 /// </summary> /// <param name="sysId">系统编号</param> /// <returns></returns> public Model.SysStructure.MSysInfo GetSysInfo(int sysId) { if (sysId < 1) { return(null); } Model.SysStructure.MSysInfo sysInfo = dal.GetSysInfo(sysId); if (sysInfo != null) { int companyId = dal.GetCompanyIdBySysId(sysId); EyouSoft.BLL.CompanyStructure.CompanyInfo companybll = new EyouSoft.BLL.CompanyStructure.CompanyInfo(); sysInfo.CompanyInfo = companybll.GetModel(companyId, sysId); companybll = null; EyouSoft.BLL.CompanyStructure.CompanyUser userbll = new EyouSoft.BLL.CompanyStructure.CompanyUser(); sysInfo.AdminInfo = userbll.GetAdminModel(companyId); userbll = null; EyouSoft.BLL.CompanyStructure.Department departmentbll = new EyouSoft.BLL.CompanyStructure.Department(); sysInfo.DepartmentInfo = departmentbll.GetModel(dal.GetHeadOfficeIdByCompanyId(companyId)); departmentbll = null; EyouSoft.BLL.CompanyStructure.CompanySetting settingbll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); sysInfo.Setting = settingbll.GetSetting(companyId); settingbll = null; EyouSoft.BLL.SysStructure.SystemDomain domainbll = new EyouSoft.BLL.SysStructure.SystemDomain(); sysInfo.Domains = domainbll.GetDomains(sysId); domainbll = null; if (sysInfo.ModuleIds == null || sysInfo.ModuleIds.Length < 1) { sysInfo.ModuleIds = new int[] { -1 }; } if (sysInfo.PartIds == null || sysInfo.PartIds.Length < 1) { sysInfo.PartIds = new int[] { -1 }; } if (sysInfo.PermissionIds == null || sysInfo.PermissionIds.Length < 1) { sysInfo.PermissionIds = new int[] { -1 }; } } return(sysInfo); }
/// <summary> /// 用户列表 /// </summary> /// <param name="sel"></param> void BindUserList(string sel) { EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo);//初始化bll IList <EyouSoft.Model.CompanyStructure.CompanyUser> userlist = userBll.GetCompanyUser(CurrentUserCompanyID); if (userlist != null && userlist.Count > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyUser user in userlist) { selOperator.Items.Add(new ListItem(user.PersonInfo.ContactName, user.ID.ToString())); } } selOperator.Items.Insert(0, new ListItem("请选择", "0")); //selOperator.Items.FindByValue(sel).Selected = true; }
protected void BindSellerlist() { //初始化绑定部门员工列表 EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(); IList <EyouSoft.Model.CompanyStructure.CompanyUser> userList = userBll.GetCompanyUser(CurrentUserCompanyID); if (userList != null && userList.Count > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyUser userItem in userList) { this.ddl_Oprator.Items.Add(new ListItem(userItem.PersonInfo.ContactName, userItem.ID.ToString())); } } this.ddl_Oprator.Items.Insert(0, new ListItem("请选择", "")); }
protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_组织机构_部门人员栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_组织机构_部门人员栏目, true); return; } pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); string method = Utils.GetQueryStringValue("method"); string ids = Utils.GetQueryStringValue("ids"); //获取员工 EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); //初始化bll bool result = false; #region 当前操作 if (method == "del") { ids = ids.TrimEnd(','); result = userBll.Remove(CurrentUserCompanyID, ids.Split(',')); MessageBox.Show(this, result?"删除成功!":"删除失败!"); } if (method == "setState") { result = userBll.SetEnable(Utils.GetInt(ids), Utils.GetQueryStringValue("hidMethod") == "start"); Utils.ResponseMeg(result, result?"设置完成!":"设置失败!"); return; } #endregion //绑定部门人员 IList <EyouSoft.Model.CompanyStructure.CompanyUser> list = userBll.GetList(CurrentUserCompanyID, pageSize, pageIndex, ref recordCount); if (list != null && list.Count > 0) { rptEmployee.DataSource = list; rptEmployee.DataBind(); BindExportPage(); } else { rptEmployee.EmptyText = "<tr><td colspan='10' align='center'>对不起,暂无部门员工信息!</td></tr>"; ExportPageInfo1.Visible = false; } }
protected void InitBindAuothor() { pageindex = 1; EyouSoft.BLL.CompanyStructure.CompanyUser cuBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); list = cuBll.GetAreaJobsByTourUserID(pagesize, pageindex, ref recordcount, SiteUserInfo.ID); }
protected void Page_Load(object sender, EventArgs e) { // 判断用户是否登录,如果没有登录跳转到登录页面,如果有登录,初始化用户对象UserInfoModel if (!IsLogin) { EyouSoft.Security.Membership.UserProvider.RedirectLogin(Domain.UserBackCenter + "/Default.aspx"); } if (!IsPostBack) { //景区编号 string Id = Utils.GetQueryStringValue("SceniceId"); if (Id != null) { EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Id); if (Area != null) { //景区联系人 联系电话 MQ EyouSoft.Model.CompanyStructure.CompanyUser userinfo = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetModel(Area.ContactOperator); if (userinfo != null) { if (userinfo.ContactInfo != null) { this.litContact.Text = userinfo.ContactInfo.ContactName; this.litContactTel.Text = userinfo.ContactInfo.Mobile; if (!string.IsNullOrEmpty(userinfo.ContactInfo.MQ)) { this.LitContactMQ.Text = Utils.GetMQ(userinfo.ContactInfo.MQ); } } } if (Area.Company != null) { //门票编号 string ticketId = Utils.GetQueryStringValue("TicketId"); if (ticketId != "" && ticketId != null) { EyouSoft.Model.ScenicStructure.MScenicTickets Tickets = new EyouSoft.BLL.ScenicStructure.BScenicTickets().GetModel(ticketId, Area.Company.ID); if (Tickets != null) { if (Utils.GetQueryStringValue("ScenicName") != "") { this.litSceniceName.Text = Utils.GetQueryStringValue("ScenicName"); } this.litSceniceType.Text = Tickets.TypeName; this.litMSPrice.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.RetailPrice); this.litYHPrices.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.WebsitePrices); this.litMinSCPrice.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.MarketPrice); this.litTHPrice.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.DistributionPrice); this.litMinlimit.Text = Tickets.Limit.ToString(); //票价有效时间段 timeHtml = DateTimeStr(Tickets.StartTime, Tickets.EndTime); this.litNotes.Text = Tickets.SaleDescription; this.litexplain.Text = Tickets.Description; } } } } } } }
/// <summary> /// 团队计划出团任务书 /// </summary> /// <param name="model"></param> private void Bind(EyouSoft.Model.TourStructure.TourTeamInfo model) { //发团时间 xcTime = model.LDate; //出发交通 lblGoTraffic.Text = model.LTraffic; //返回交通 lblEndTraffic.Text = model.RTraffic; //出团时间 lblLDate.Text = model.LDate.ToShortDateString(); //联系人 EyouSoft.BLL.CompanyStructure.CompanyUser csBLL = new EyouSoft.BLL.CompanyStructure.CompanyUser(); string SentPeoples = ""; //判断是否有联系人 if (model.SentPeoples.Count >= 0) { for (int i = 0; i < model.SentPeoples.Count; i++) { //联系人数据 SentPeoples = ""; string tel = csBLL.GetUserBasicInfo(model.SentPeoples[i].OperatorId).ContactTel; SentPeoples += "联系人:" + model.SentPeoples[i].OperatorName + "" + tel; } } else { SentPeoples = "暂无联系人"; } //联系人 lblSentPeoples.Text = SentPeoples; //集合时间 lblGatheringTime.Text = model.GatheringTime; //集合地点 lblGatheringPlace.Text = model.GatheringPlace; //集合标志 lblGatheringSign.Text = model.GatheringSign; //返航时间 lblRTraffic.Text = model.RTraffic; //线路名称 lblRouteName.Text = model.RouteName; //地接安排 if (model.LocalAgencys != null) { rptlist.DataSource = model.LocalAgencys; rptlist.DataBind(); } //标准发布 if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { //标准发布数据不为空 if (model.TourNormalInfo != null) { //行程信息 xc_list.DataSource = model.TourNormalInfo.Plans; xc_list.DataBind(); //不包含项目 lblBuHanXiangMu.Text = model.TourNormalInfo.BuHanXiangMu; //自费项目 lblZiFeiXIangMu.Text = model.TourNormalInfo.ZiFeiXIangMu; //儿童安排 lblErTongAnPai.Text = model.TourNormalInfo.ErTongAnPai; //购物安排 lblGouWuAnPai.Text = model.TourNormalInfo.GouWuAnPai; //购物安排 lblGouWuAnPai.Text = model.TourNormalInfo.GouWuAnPai; //注意事项 lblZhuYiShiXiang.Text = model.TourNormalInfo.ZhuYiShiXiang; //包含项目数据绑定 rpt_sList.DataSource = model.Services; rpt_sList.DataBind(); //显示标准 pnlProject.Visible = true; //隐藏快速 xcquick.Visible = false; } //lt_desc.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); } else//快速发布 { //隐藏标准 pnlProject.Visible = false; //显示快速 xcquick.Visible = true; if (model.TourQuickInfo != null) { lblQuickPlan.Text = model.TourQuickInfo.QuickPlan; lblKs.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourQuickInfo.Remark); } } }
/// <summary> /// 初始化方法 /// </summary> void BindXC() { string tourId = Utils.GetQueryStringValue("tourId"); if (tourId == "") { Response.Write("未找到信息!"); return; } //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明散拼计划对象 EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId); if (model != null) { //设置出团时间 xcTime = model.LDate; //发送专线 this.txtFromCompany.Text = SiteUserInfo.CompanyName; this.txtCompany.Text = SiteUserInfo.CompanyName; if (SiteUserInfo.ContactInfo != null) { //联系人姓名 this.txtFromName.Text = SiteUserInfo.ContactInfo.ContactName; //联系人传真 this.txtFromFax.Text = SiteUserInfo.ContactInfo.ContactFax; //联系人电话 this.txtFromTel.Text = SiteUserInfo.ContactInfo.ContactTel; this.txtContactTel.Text = SiteUserInfo.ContactInfo.ContactTel; } //线路名称 this.txtAreaName.Text = model.RouteName; //天数 this.txtDayCount.Text = model.TourDays.ToString(); //出发交通 this.txtLTraffic.Text = model.LTraffic; //返程交通 this.txtRTraffic.Text = model.RTraffic; //人数 //this.txtPeopleCount.Text = model.PlanPeopleNumber.ToString(); //设置游客信息 IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customerList = new EyouSoft.BLL.TourStructure.TourOrder().GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); ; if (customerList != null && customerList.Count > 0) { visitorRowsCount = customerList.Count; //绑定旅客列表 this.rptCustomerList.DataSource = customerList; this.rptCustomerList.DataBind(); } //获取订单信息 EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(SiteUserInfo.CompanyID, Utils.GetQueryStringValue("orderId")); int buyCompanyID = orderModel.BuyCompanyID; #region 接收方信息 EyouSoft.Model.CompanyStructure.CustomerInfo cModel = new EyouSoft.Model.CompanyStructure.CustomerInfo(); EyouSoft.BLL.CompanyStructure.Customer cBLL = new EyouSoft.BLL.CompanyStructure.Customer(); cModel = cBLL.GetCustomerModel(buyCompanyID); txtToCompany.Text = cModel.Name; txtToName.Text = cModel.ContactName; txtToFax.Text = cModel.Fax; txtToTel.Text = cModel.Phone; #endregion //标准版 if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { //隐藏快速版行程安排 this.tblXCFast.Visible = false; //隐藏快速版服务标准 this.tblFastService.Visible = false; if (model.SentPeoples != null && model.SentPeoples.Count > 0) { //送团人信息 for (int i = 0; i < model.SentPeoples.Count; i++) { EyouSoft.Model.CompanyStructure.CompanyUser SendUserInfo = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(model.SentPeoples[i].OperatorId); if (SendUserInfo != null) { //送团人 this.txtSendMan.Text += SendUserInfo.PersonInfo.ContactName == null ? "" : SendUserInfo.PersonInfo.ContactName + ","; //送团电话 this.txtSendTel.Text += SendUserInfo.PersonInfo == null ? "" : SendUserInfo.PersonInfo.ContactTel + ","; } } this.txtSendMan.Text = this.txtSendMan.Text.TrimEnd(','); this.txtSendTel.Text = this.txtSendTel.Text.TrimEnd(','); } if (model.TourNormalInfo != null) { //行程安排 this.xc_list.DataSource = model.TourNormalInfo.Plans; this.xc_list.DataBind(); //包含项目 this.rptProject.DataSource = model.TourNormalInfo.Services; this.rptProject.DataBind(); //不包含项目 this.lblNoPriject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //儿童安排 this.lblChildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); //购物安排 this.lblShop.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //赠送项目 this.lblZiFei.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); //注意事项 this.lblZhuyi.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //温馨提醒 this.lblTiXing.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); } //获得报价说明 if (Utils.GetQueryStringValue("orderId") != "") { //EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(SiteUserInfo.CompanyID, Utils.GetQueryStringValue("orderId")); if (orderModel != null) { //成人价格 this.lblManPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.PersonalPrice.ToString("0.00")); //成人数 this.lblManCount.Text = orderModel.AdultNumber.ToString(); //儿童价格 this.lblChildPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.ChildPrice.ToString("0.00")); //儿童数 this.lblChildCount.Text = orderModel.ChildNumber.ToString(); this.txtPeopleCount.Text = (orderModel.AdultNumber + orderModel.ChildNumber).ToString(); //总价格 this.lblAllPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.SumPrice.ToString("0.00")); } else { //成人价格 this.lblManPrice.Text = "0"; //成人数 this.lblManCount.Text = "0"; //儿童价格 this.lblChildPrice.Text = "0"; //儿童数 this.lblChildCount.Text = "0"; //总价格 this.lblAllPrice.Text = "0"; } } else { //成人价格 this.lblManPrice.Text = "0"; //成人数 this.lblManCount.Text = "0"; //儿童价格 this.lblChildPrice.Text = "0"; //儿童数 this.lblChildCount.Text = "0"; //总价格 this.lblAllPrice.Text = "0"; } } //快速版 else { this.txtPeopleCount.Text = (orderModel.AdultNumber + orderModel.ChildNumber).ToString(); //隐藏标准版 行程安排 this.tblXingCheng.Visible = false; //隐藏标准版 服务 this.tblNoService.Visible = false; if (model.TourQuickInfo != null) { //设置行程安排 this.lclXingCheng.Text = model.TourQuickInfo.QuickPlan; //设置服务标准 this.lclService.Text = model.TourQuickInfo.Service; } } } EyouSoft.Model.CompanyStructure.CompanyInfo infoModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(SiteUserInfo.CompanyID, SiteUserInfo.SysId); if (infoModel != null) { EyouSoft.Model.CompanyStructure.CompanyAccount account = null;//公司账户 if (infoModel.CompanyAccountList != null && infoModel.CompanyAccountList.Count > 0) { account = infoModel.CompanyAccountList[0]; this.lblCompanyName.Text = SiteUserInfo.CompanyName; this.lblBankName.Text = account.BankName; this.lblBankNum.Text = account.BankNo; this.lblBankUserName.Text = account.AccountName; } } }
protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_组织机构_部门人员栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_组织机构_部门人员栏目, false); return; } empId = Utils.GetInt(Utils.GetQueryStringValue("empId")); //获取员工Id string method = Utils.GetFormValue("hidMethod"); //获取当前操作(保存/继续) method2 = Utils.GetQueryStringValue("copy"); //是否复制数据 string showMess = "数据保存成功!"; //提示消息 //如果当前操作无则初始加载(否则保存操作) EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); //初始化bll EyouSoft.BLL.CompanyStructure.Department departBll = new EyouSoft.BLL.CompanyStructure.Department(); //初始化bll if (method == "") { #region 初始化员工信息 //所属部门 IList <EyouSoft.Model.CompanyStructure.Department> departList = departBll.GetAllDept(CurrentUserCompanyID); selBdepart.DataTextField = "DepartName"; selBdepart.DataValueField = "Id"; selBdepart.DataSource = departList; selBdepart.DataBind(); selBdepart.Items.Insert(0, new ListItem("选择部门", "")); //监管部门 selMdepart.DataTextField = "DepartName"; selMdepart.DataValueField = "Id"; selMdepart.DataSource = departList; selMdepart.DataBind(); selMdepart.Items.Insert(0, new ListItem("选择部门", "")); if (empId != 0) //如果员工Id不为空则加载数据 { EyouSoft.Model.CompanyStructure.CompanyUser userModel = userBll.GetUserInfo(empId); if (userModel != null) { txtEmail.Value = userModel.PersonInfo.ContactEmail; txtFax.Value = userModel.PersonInfo.ContactFax; txtIntroduce.Value = userModel.PersonInfo.PeopProfile; txtMoible.Value = userModel.PersonInfo.ContactMobile; txtMSN.Value = userModel.PersonInfo.MSN; txtQQ.Value = userModel.PersonInfo.QQ; txtRemark.Value = userModel.PersonInfo.Remark; txtTel.Value = userModel.PersonInfo.ContactTel; rdiSex.SelectedValue = ((int)userModel.PersonInfo.ContactSex).ToString(); selMdepart.Value = userModel.SuperviseDepartId.ToString(); selBdepart.Value = userModel.DepartId.ToString(); txtDuty.Value = userModel.PersonInfo.JobName; if (method2 != "copy") //如果不是复制则显示用户名,密码,姓名 { txtUserName.Value = userModel.UserName; txtUserName.Attributes.Add("readonly", "readonly"); txtPass.Value = userModel.PassWordInfo.NoEncryptPassword; pass = userModel.PassWordInfo.NoEncryptPassword; txtName.Value = userModel.PersonInfo.ContactName; } } } #endregion } else { #region 保存员工信息 bool result = false; //判断用户名是否已经存在 if (method == "isexist") { string uName = Utils.GetFormValue("uName"); if (method2 == "copy") { empId = 0; } result = userBll.IsExists(empId, uName, CurrentUserCompanyID); Utils.ResponseMeg(true, result ? "isExist" : "noisExist"); return; } //验证数据完整性 if (Utils.InputText(txtUserName.Value) == "" || Utils.InputText(txtPass.Value) == "" || Utils.InputText(txtName.Value) == "") { MessageBox.Show(this, "数据请填写完整!"); return; } EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.Model.CompanyStructure.CompanyUser(); //如果员工编号不为空且不是复制操作则修改操作(否则为新增) EyouSoft.Model.CompanyStructure.ContactPersonInfo PersonInfo = new EyouSoft.Model.CompanyStructure.ContactPersonInfo(); PersonInfo.JobName = Utils.InputText(txtDuty.Value); PersonInfo.ContactEmail = Utils.InputText(txtEmail.Value); PersonInfo.ContactFax = Utils.InputText(txtFax.Value); PersonInfo.PeopProfile = Utils.InputText(txtIntroduce.Value, 250); PersonInfo.ContactMobile = Utils.InputText(txtMoible.Value); PersonInfo.UserType = EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType.专线用户; PersonInfo.MSN = Utils.InputText(txtMSN.Value); PersonInfo.ContactName = Utils.InputText(txtName.Value); PersonInfo.QQ = Utils.InputText(txtQQ.Value); PersonInfo.Remark = Utils.InputText(txtRemark.Value, 250); PersonInfo.ContactTel = Utils.InputText(txtTel.Value); PersonInfo.ContactSex = (EyouSoft.Model.EnumType.CompanyStructure.Sex)Utils.GetInt(rdiSex.SelectedValue); userModel.PersonInfo = PersonInfo; userModel.IsEnable = true; userModel.LastLoginTime = DateTime.Now; userModel.CompanyId = CurrentUserCompanyID; userModel.DepartId = Utils.GetInt(Utils.GetFormValue(selBdepart.UniqueID)); userModel.SuperviseDepartName = Utils.GetFormValue("selMName"); if (userModel.SuperviseDepartName == "选择部门") { userModel.SuperviseDepartName = ""; } userModel.DepartName = Utils.GetFormValue("selBName"); userModel.IssueTime = DateTime.Now; userModel.PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord { NoEncryptPassword = Utils.InputText(txtPass.Value) }; userModel.SuperviseDepartId = Utils.GetInt(Utils.GetFormValue(selMdepart.UniqueID)); userModel.UserName = Utils.InputText(txtUserName.Value); if (empId != 0 && method2 != "copy")//修改 { userModel.ID = empId; result = userBll.Update(userModel); } else { result = userBll.Add(userModel);//添加 } if (!result) { showMess = "数据保存失败!"; } //继续添加则刷新页面,否则关闭当前窗口 if (method == "continue") { MessageBox.ShowAndRedirect(this, showMess, "EmployeeEdit.aspx"); } else { MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/systemset/organize/DepartEmployee.aspx';window.parent.Boxy.getIframeDialog('{1}').hide()", showMess, Utils.GetQueryStringValue("iframeId"))); } #endregion } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> protected void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null) { if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model; if (tModel != null) { //线路名称 this.litRouteName.Text = tModel.RouteName; EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId")); if (order != null) { //组团社 this.litBuyCompanyName.Text = order.BuyCompanyName; //组团社联系人 this.litCustomName.Text = order.ContactName; this.litTel.Text = order.ContactTel; this.litFax.Text = order.ContactFax; //游客信息 string strVistors = string.Empty; if (order.CustomerList != null && order.CustomerList.Count > 0) { for (int i = 0; i < order.CustomerList.Count; i++) { strVistors += order.CustomerList[i].VisitorName + ","; } this.litVisitorsList.Text = strVistors.TrimEnd(','); } } //机场送团 if (tModel.SentPeoples != null && tModel.SentPeoples.Count > 0) { string strSongTuanName = string.Empty; for (int i = 0; i < tModel.SentPeoples.Count; i++) { strSongTuanName += tModel.SentPeoples[i].OperatorName + ","; } this.litSongTuanName.Text = strSongTuanName.TrimEnd(','); //手机 EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(tModel.SentPeoples[0].OperatorId); if (userModel != null) { this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile; } } //去程航班/时间 this.litLFilght.Text = tModel.LTraffic; //返程航班/时间 this.litRFilght.Text = tModel.RTraffic; //集合地点 this.litJihePlace.Text = tModel.GatheringPlace; if (tModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { this.litQplan.Visible = false; this.pnequick.Visible = false; if (tModel.TourNormalInfo != null) { //注意事项 this.litZhuYiShiXiang.Text = tModel.TourNormalInfo.ZhuYiShiXiang; //温馨提醒 this.litWenXinTiXing.Text = tModel.TourNormalInfo.WenXinTiXing; //行程安排 if (tModel.TourNormalInfo.Plans != null && tModel.TourNormalInfo.Plans.Count > 0) { for (int i = 0; i < tModel.TourNormalInfo.Plans.Count; i++) { TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>"; } } } } else { this.pnetab.Visible = false; this.tabView.Attributes.Add("style", "border: 1px #000000 solid"); this.pneStand.Visible = false; if (tModel.TourQuickInfo != null) { this.litQplan.Text = tModel.TourQuickInfo.QuickPlan; this.litServerStand.Text = tModel.TourQuickInfo.Service; } } } } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; if (ttModel != null) { //线路名称 this.litRouteName.Text = ttModel.RouteName; //组团社 this.litBuyCompanyName.Text = ttModel.BuyerCName; //组团社联系人 EyouSoft.Model.CompanyStructure.CustomerInfo CustomerInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(ttModel.BuyerCId); if (CustomerInfo != null) { this.litCustomName.Text = CustomerInfo.ContactName; this.litTel.Text = CustomerInfo.Phone; this.litFax.Text = CustomerInfo.Fax; } EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId")); if (order != null) { //组团社 this.litBuyCompanyName.Text = order.BuyCompanyName; //组团社联系人 this.litCustomName.Text = order.ContactName; this.litTel.Text = order.ContactTel; this.litFax.Text = order.ContactFax; //游客信息 string strVistors = string.Empty; if (order.CustomerList != null && order.CustomerList.Count > 0) { for (int i = 0; i < order.CustomerList.Count; i++) { strVistors += order.CustomerList[i].VisitorName + ","; } this.litVisitorsList.Text = strVistors.TrimEnd(','); } } //机场送团 if (ttModel.SentPeoples != null && ttModel.SentPeoples.Count > 0) { string strSongTuanName = string.Empty; for (int i = 0; i < ttModel.SentPeoples.Count; i++) { strSongTuanName += ttModel.SentPeoples[i].OperatorName + ","; } this.litSongTuanName.Text = strSongTuanName.TrimEnd(','); //手机 EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(ttModel.SentPeoples[0].OperatorId); if (userModel != null) { this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile; } } //去程航班/时间 this.litLFilght.Text = ttModel.LTraffic; //返程航班/时间 this.litRFilght.Text = ttModel.RTraffic; //集合地点 this.litJihePlace.Text = ttModel.GatheringPlace; if (ttModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { this.litQplan.Visible = false; this.pnequick.Visible = false; if (ttModel.TourNormalInfo != null) { //注意事项 this.litZhuYiShiXiang.Text = ttModel.TourNormalInfo.ZhuYiShiXiang; //温馨提醒 this.litWenXinTiXing.Text = ttModel.TourNormalInfo.WenXinTiXing; //行程安排 if (ttModel.TourNormalInfo.Plans != null && ttModel.TourNormalInfo.Plans.Count > 0) { for (int i = 0; i < ttModel.TourNormalInfo.Plans.Count; i++) { TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>"; } } } } else { this.pnetab.Visible = false; this.pneStand.Visible = false; this.tabView.Attributes.Add("style", "border: 1px #000000 solid"); if (ttModel.TourQuickInfo != null) { this.litQplan.Text = ttModel.TourQuickInfo.QuickPlan; this.litServerStand.Text = ttModel.TourQuickInfo.Service; } } } } } }
protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_组织机构_部门人员栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_组织机构_部门人员栏目, false); return; } this.cu_perList.SysId = SiteUserInfo.SysId; string method = Utils.GetQueryStringValue("method"); //获取当期操作 empId = Utils.GetInt(Utils.GetQueryStringValue("empId")); //获取要设置的员工Id roleBll = new EyouSoft.BLL.CompanyStructure.SysRoleManage(); EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); //初始化bll if (method == "setPermit") { #region 设置权限 //设置权限 roleId = Utils.GetInt(Utils.GetFormValue("roleId")); string[] perIds = Utils.GetFormValue("perIds").Split(',');//获取选中的权限 if (userBll.SetPermission(empId, roleId, perIds)) { Utils.ResponseMegSuccess(); } else { Utils.ResponseMegError(); } return; #endregion } else { #region 初始化数据或切换角色 int recordCount = 0; //绑定角色下拉框 IList <EyouSoft.Model.CompanyStructure.SysRoleManage> roleList = roleBll.GetList(100000, 1, ref recordCount, CurrentUserCompanyID); if (roleList != null) { selRole.DataTextField = "RoleName"; selRole.DataValueField = "Id"; selRole.DataSource = roleList; selRole.DataBind(); selRole.Attributes.Add("onchange", "SepPermit.changeRole(this);"); } if (method == "getPermit") //切换角色 { roleId = Utils.GetInt(Utils.GetQueryStringValue("roleId")); //获取角色 if (roleId != 0) { //获取角色拥有的权限 BindPermit(roleId); } } else if (method == "")//初始化数据 { EyouSoft.Model.CompanyStructure.CompanyUser userModel = userBll.GetUserInfo(empId); selRole.Value = userModel.RoleID.ToString(); if (userModel != null) { if (!string.IsNullOrEmpty(userModel.PermissionList)) { string[] permits = userModel.PermissionList.Split(','); cu_perList.SetPermitList = permits; } else { if (userModel.RoleID == 0) { BindPermit(roleList != null && roleList.Count > 0 ? roleList[0].Id : 0); } } } else { BindPermit(roleList != null && roleList.Count > 0 ? roleList[0].Id : 0); } } #endregion } }
protected void GetSingleServer(string Tourid, string planId) { EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo); EyouSoft.Model.TourStructure.TourSingleInfo EditModel = null; EditModel = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(Tourid); if (EditModel != null) { //计划人数 this.PelpeoNumber.Value = EditModel.PlanPeopleNumber.ToString(); //确认时间 this.ConfirmDate.Value = System.DateTime.Now.ToString("yyyy-MM-dd"); //供应商信息集合 IList <EyouSoft.Model.TourStructure.PlanSingleInfo> planlist = EditModel.Plans; if (planId != "") { EyouSoft.Model.TourStructure.PlanSingleInfo singleModel = new EyouSoft.BLL.TourStructure.Tour().GetSinglePlanInfo(planId); if (singleModel != null) { //获取供应商信息--供应商名称 this.txtTo.Value = singleModel.SupplierName; //获取供应商信息--供应商Id int supplierid = singleModel.SupplierId; //实例化供应商基础信息BLL EyouSoft.BLL.CompanyStructure.SupplierBaseHandle csBLL = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle(); //实例化供应商基础信息Model EyouSoft.Model.CompanyStructure.SupplierBasic model = new EyouSoft.Model.CompanyStructure.SupplierBasic(); //根据供应商基础信息ID获取供应商实体 model = csBLL.GetSupplierBase(supplierid); //供应商基础信息不为空并且联系人不为空 if (model != null && model.SupplierContact != null) { //供应商 联系人电话 this.txtTel.Value = model.SupplierContact[0].ContactTel; //供应商联系人Fax this.txtFax.Value = model.SupplierContact[0].ContactFax; } this.lblServiceType.Text = "<strong>服务类别:</strong>" + singleModel.ServiceType.ToString(); this.lblSupplierName.Text = "<strong>供应商:</strong>" + singleModel.SupplierName; this.lblArrange.Text = "<strong>具体安排:</strong>" + singleModel.Arrange; } else { this.pnlIsShow.Visible = false; this.Repeaterlist.DataSource = planlist; this.Repeaterlist.DataBind(); } } else { //客户单位名称 this.txtTo.Value = EditModel.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(EditModel.BuyerCId); if (cusModel != null) { //组团 联系人电话 this.txtTel.Value = cusModel.Phone; //组团联系人Fax this.txtFax.Value = cusModel.Fax; } this.pnlIsShow.Visible = false; this.Repeaterlist.DataSource = planlist; this.Repeaterlist.DataBind(); } #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(EditModel.OperatorId); if (userInfoModel != null) { //主要联系人电话 this.txtTelS.Value = userInfoModel.ContactTel; //专线FAX this.txtFaxS.Value = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(EditModel.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.txtFr.Value = companyModel.CompanyName; } } #endregion //游客信息 IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customer = EditModel.Customers.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); ; if (customer.Count > 0 && customer != null) { this.repCustomer.DataSource = customer; this.repCustomer.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindCusList(); string tourId = Utils.GetQueryStringValue("tourId"); //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId); if (model != null) { lt_routName.Text = model.RouteName; #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(model.OperatorId); if (userInfoModel != null) { txt_Ldate.Value = model.LDate.ToString("yyyy-MM-dd"); txt_lxr2.Value = userInfoModel.ContactName; //主要联系人电话 this.txt_tel2.Value = userInfoModel.ContactTel; //专线FAX this.txt_fax2.Value = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(model.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { txt_fax2.Value = companyModel.ContactFax; txt_tel2.Value = companyModel.ContactTel; txt_lxr2.Value = companyModel.ContactName; this.txtyfJbr.Value = companyModel.ContactName; } } #endregion txt_HCHB.Value = model.RTraffic; txt_QCHB.Value = model.LTraffic; if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { txt_jhDate.Value = model.GatheringTime; //txt_str.Value = model.SentPeoples.FirstOrDefault().OperatorName; EyouSoft.Model.TourStructure.TourSentPeopleInfo sentModel = model.SentPeoples.FirstOrDefault(); if (sentModel != null) { txt_str.Value = sentModel.OperatorName; } txt_jhdd.Value = model.GatheringPlace; txt_jhBZ.Value = model.GatheringSign; xc_Normarl.Visible = true; tb_service_normal.Visible = true; //出团日期 LeaveDate = model.LDate; this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //儿童安排 this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); //自费项目 this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //温馨提示 this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); //行程安排 this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); //包含项目 this.rptProject.DataSource = model.TourNormalInfo.Services; this.rptProject.DataBind(); } else { tb_service_quick.Visible = true; xc_quick.Visible = true; litTravel.Text = model.TourQuickInfo.QuickPlan; litService.Text = model.TourQuickInfo.Service; } } } }
protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_组织机构_部门设置栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_组织机构_部门设置栏目, false); return; } int departId = Utils.GetInt(Utils.GetQueryStringValue("departId")); //报价Id string method = Utils.GetFormValue("hidMethod"); //获取当前操作(保存/继续) string method2 = Utils.GetQueryStringValue("method2"); //判断是否为新增或修改 string showMess = "数据保存成功!"; //提示消息 EyouSoft.Model.CompanyStructure.Department departModel = null; EyouSoft.BLL.CompanyStructure.Department departBll = new EyouSoft.BLL.CompanyStructure.Department(); //初始化bll EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); //初始化bll IList <EyouSoft.Model.CompanyStructure.Department> departList = departBll.GetAllDept(CurrentUserCompanyID); IList <EyouSoft.Model.CompanyStructure.CompanyUser> userlist = userBll.GetCompanyUser(CurrentUserCompanyID); //绑定部门列表 if (departList != null && departList.Count > 0) { selParentDE.DataTextField = "DepartName"; selParentDE.DataValueField = "Id"; selParentDE.DataSource = departList; selParentDE.DataBind(); } //绑定员工列表 if (userlist != null && userlist.Count > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyUser user in userlist) { selDepEmp.Items.Add(new ListItem(user.PersonInfo.ContactName, user.ID.ToString())); } } selParentDE.Items.Insert(0, new ListItem("请选择", "")); //上级部门 selDepEmp.Items.Insert(0, new ListItem("请选择", "")); //部门主管 //无操作方式则为获取数据 if (method == "") { #region 初始化数据 if (departId != 0) { departModel = departBll.GetModel(departId); if (method2 == "update")//修改 { if (departModel != null) { txtDepName.Value = departModel.DepartName; //部门名称 selDepEmp.Value = departModel.DepartManger.ToString(); //部门主管 selParentDE.Value = departModel.PrevDepartId.ToString(); // 上级部门 parentD = departModel.PrevDepartId.ToString(); txtTel.Value = departModel.ContactTel; //联系电话 txtRemark.Value = departModel.Remark; //备注 txtFax.Value = departModel.ContactFax; //传真 if (!string.IsNullOrEmpty(departModel.PageHeadFile)) { hidHeader.Value = departModel.PageHeadFile; } if (!string.IsNullOrEmpty(departModel.PageFootFile)) { hidFooter.Value = departModel.PageFootFile; } if (!string.IsNullOrEmpty(departModel.TemplateFile)) { hidModel.Value = departModel.TemplateFile; } if (!string.IsNullOrEmpty(departModel.DepartStamp)) { hidSeat.Value = departModel.DepartStamp; } pageHeader = !string.IsNullOrEmpty(departModel.PageHeadFile) ? string.Format("<a href='{0}' target='_blank'>查看</a> <a href='javascript:;' onclick=\"return De.del('{1}',this);\"><img src='/images/fujian_x.gif'/></a>", departModel.PageHeadFile, hidHeader.ClientID) : "暂无页眉"; pageFooter = !string.IsNullOrEmpty(departModel.PageFootFile) ? string.Format("<a href='{0}' target='_blank'>查看</a> <a href='javascript:;' onclick=\"return De.del('{1}',this);\"><img src='/images/fujian_x.gif'/></a>", departModel.PageFootFile, hidFooter.ClientID) : "暂无页脚"; pageModel = !string.IsNullOrEmpty(departModel.TemplateFile) ? string.Format("<a href='{0}' target='_blank'>查看</a> <a href='javascript:;' onclick=\"return De.del('{1}',this);\"><img src='/images/fujian_x.gif'/></a>", departModel.TemplateFile, hidModel.ClientID) : "暂无模板"; departSeal = !string.IsNullOrEmpty(departModel.DepartStamp) ? string.Format("<a href='{0}' target='_blank'>查看</a> <a href='javascript:;' onclick=\"return De.del('{1}',this);\"><img src='/images/fujian_x.gif'/></a>", departModel.DepartStamp, hidSeat.ClientID) : "暂无公章"; if (parentD == "0") { selParentDE.Attributes.Remove("valid"); } } } else { if (departModel != null) { selParentDE.Value = departModel.Id.ToString();//如果是添加操作则将部门ID设置上级部门 } } return; } #endregion } else { #region 保存操作 bool result = true; departModel = new EyouSoft.Model.CompanyStructure.Department(); string fileName = string.Empty; string oldName = string.Empty; HttpPostedFile fHeader = Request.Files["fileHeader"]; HttpPostedFile fFooter = Request.Files["fileFooter"]; HttpPostedFile fSeal = Request.Files["fileSeal"]; HttpPostedFile fModel = Request.Files["fileModel"]; if (fHeader != null && !string.IsNullOrEmpty(fHeader.FileName)) { result = UploadFile.FileUpLoad(fHeader, "systemset", out fileName, out oldName);//上传页眉 departModel.PageHeadFile = fileName; } else { departModel.PageHeadFile = hidHeader.Value; } if (result && (fFooter != null && !string.IsNullOrEmpty(fFooter.FileName))) { result = UploadFile.FileUpLoad(fFooter, "systemset", out fileName, out oldName);//上传页脚 departModel.PageFootFile = fileName; } else { departModel.PageFootFile = hidFooter.Value; } if (result && (fModel != null && !string.IsNullOrEmpty(fModel.FileName))) { result = UploadFile.FileUpLoad(fModel, "systemset", out fileName, out oldName);//上传模板 departModel.TemplateFile = fileName; } else { departModel.TemplateFile = hidModel.Value; } if (result && (fSeal != null && !string.IsNullOrEmpty(fSeal.FileName))) { result = UploadFile.FileUpLoad(fSeal, "systemset", out fileName, out oldName);//上传公章 departModel.DepartStamp = fileName; } else { departModel.DepartStamp = hidSeat.Value; } if (result) { departModel.CompanyId = CurrentUserCompanyID; //公司ID departModel.ContactFax = Utils.InputText(txtFax.Value); //传真 departModel.ContactTel = Utils.InputText(txtTel.Value); //电话 departModel.DepartName = Utils.InputText(txtDepName.Value); //部门名称 departModel.Remark = Utils.InputText(txtRemark.Value); //备注 departModel.IssueTime = DateTime.Now; //添加时间 departModel.OperatorId = SiteUserInfo.ID; //操作人 departModel.PrevDepartId = Utils.GetInt(Utils.GetFormValue(selParentDE.UniqueID)); //上级部门 departModel.DepartManger = Utils.GetInt(Utils.GetFormValue(selDepEmp.UniqueID)); //部门主管 //if (departModel.DepartManger == 0) //{ // MessageBox.Show(this, "请填写完整数据!"); // return; //} if (departId != 0) { if (method2 == "update") { departModel.Id = departId; result = departBll.Update(departModel);//修改部门 } else { result = departBll.Add(departModel);//添加部门 } } else { result = departBll.Add(departModel);//添加部门 } } if (!result) { showMess = "数据保存失败!"; } StringBuilder messBuilder = new StringBuilder(); //如果是修改则回调父窗口的修改方法,否则回调新增方法 if (method2 == "update") { messBuilder.AppendFormat(";window.parent.DM.callbackUpdateD('{0}','{1}','{3}');alert('{2}');", departId, Utils.InputText(txtDepName.Value), showMess, departModel.PrevDepartId.ToString() != Utils.GetFormValue("hidParentDE")); } else { messBuilder.AppendFormat(";window.parent.DM.callbackAddD('{0}');alert('{1}');", departId, showMess); } //如果是保存继续则刷新页面,否则关闭弹窗 if (method == "continue") { messBuilder.AppendFormat("window.location='/systemset/organize/DepartEdit.aspx?method2=add&departId={0}", departId); } else { messBuilder.AppendFormat("window.parent.Boxy.getIframeDialog('{0}').hide();", Utils.GetQueryStringValue("iframeId")); } MessageBox.ResponseScript(this, messBuilder.ToString()); return; #endregion } }
private void onInit() { string name = Utils.GetQueryStringValue("OperName"); string departID = Utils.GetQueryStringValue("departID"); string departName = Utils.GetQueryStringValue("departName"); string topId = Utils.GetQueryStringValue("topIID"); string iframeId = Utils.GetQueryStringValue("iframeId"); string txtname = Utils.GetQueryStringValue("txtname"); string lblID = Utils.GetQueryStringValue("lblID"); string hdid = Utils.GetQueryStringValue("hdid"); string selectedPeopleIdList = GetSelectedIdList(); this.UCSelectDepartment1.GetDepartmentName = departName; this.UCSelectDepartment1.GetDepartId = departID; pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);//分页索引 EyouSoft.BLL.CompanyStructure.CompanyUser bll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); //初始化已选择人员列表 if (selectedPeopleIdList != "") { System.Text.StringBuilder str1 = new System.Text.StringBuilder(); IList <EyouSoft.Model.CompanyStructure.CompanyUser> selectedList = new List <EyouSoft.Model.CompanyStructure.CompanyUser>(); EyouSoft.Model.CompanyStructure.CompanyUser companyUser = null; string[] idArr = selectedPeopleIdList.Split(','); int id = 0; for (int i = 0; i < idArr.Length; i++) { if (Int32.TryParse(idArr[i], out id)) { companyUser = bll.GetUserInfo(id); if (companyUser != null) { selectedList.Add(companyUser); } } } if (selectedList.Count > 0) { int k = 1; //循环列表,输出 foreach (EyouSoft.Model.CompanyStructure.CompanyUser model in selectedList) { //判断是不是一行的第一个 if (k % 5 == 1)//是 { //输出TR BEGIN TAG str1.Append("<tr class=\"odd\">"); } str1.Append("<td height=\"28\" bgcolor=\"#e3f1fc\" width=\"20%\" class=\"pandl3\">"); str1.AppendFormat("<input checked type=\"checkbox\" id=\"{0}\" value=\"{0}\">", model.ID); str1.AppendFormat("<label id=\"for_{0}\" for=\"{0}\">{1}</label>", model.ID, model.PersonInfo.ContactName); str1.Append("</td>"); //判断是不是一行的第五个并且不是最后一个 if (k % 5 == 0 && k <= selectedList.Count)//是一行的第五个 { str1.Append("</tr>"); } else if (k == selectedList.Count) { int i = k % 5; //计算当前是第几个TD,然后往后补空。 for (++i; i <= 5; i++) { str1.Append("<td height=\"28\" bgcolor=\"#e3f1fc\" width=\"20%\" class=\"pandl3\">"); str1.Append(" "); str1.Append("</td>"); } str1.Append("</tr>"); } k++; } //str.Append("</tr>"); strSelectedPeopleHtml = str1.ToString(); } } //初始化人员列表 System.Text.StringBuilder str = new System.Text.StringBuilder(); System.Collections.Generic.IList <EyouSoft.Model.CompanyStructure.CompanyUser> Ilist = null; if (!string.IsNullOrEmpty(departID) || !string.IsNullOrEmpty(name)) { Ilist = bll.GetListByContactName(pageSize, pageIndex, ref recordCount, Utils.GetInt(departID, -1), name); } else { Ilist = bll.GetUserInfo(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount); } selectedPeopleIdList = "," + selectedPeopleIdList + ","; bool isSelected = false; if (Ilist != null && Ilist.Count > 0) { int k = 1; //循环列表,输出 foreach (EyouSoft.Model.CompanyStructure.CompanyUser model in Ilist) { //判断是不是一行的第一个 if (k % 5 == 1)//是 { //输出TR BEGIN TAG str.Append("<tr class=\"odd\">"); } isSelected = false; if (selectedPeopleIdList.IndexOf("," + model.ID.ToString() + ",") != -1) { isSelected = true; } str.Append("<td height=\"28\" bgcolor=\"#e3f1fc\" width=\"20%\" class=\"pandl3\">"); str.AppendFormat("<input " + (isSelected?"checked":"") + " type=\"checkbox\" id=\"{0}\" value=\"{0}\">", model.ID); str.AppendFormat("<label id=\"for_{0}\" for=\"{0}\">{1}</label>", model.ID, model.PersonInfo.ContactName); str.Append("</td>"); //判断是不是一行的第五个并且不是最后一个 if (k % 5 == 0 && k <= Ilist.Count)//是一行的第五个 { str.Append("</tr>"); } else if (k == Ilist.Count) { int i = k % 5; //计算当前是第几个TD,然后往后补空。 for (++i; i <= 5; i++) { str.Append("<td height=\"28\" bgcolor=\"#e3f1fc\" width=\"20%\" class=\"pandl3\">"); str.Append(" "); str.Append("</td>"); } str.Append("</tr>"); } k++; } //str.Append("</tr>"); strHtml = str.ToString(); } str = null; bll = null; Ilist = null; //分页控件初始化 BindPage(name, departID, topId, iframeId, txtname, lblID, hdid); }
protected bool IsStartState = true; //当前账户是否是停用状态 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.AccountDaylist.Items.Clear(); string[] intarry = new string[32]; for (int i = 0; i < 32; i++) { if (i == 0) { intarry[0] = "请选择"; } else { intarry[i] = (i).ToString(); } } if (intarry != null && intarry.Length > 0) { this.AccountDaylist.DataSource = intarry; this.AccountDaylist.DataBind(); } } #region 设置公司ID初始化省份城市列表 ucProvince1.CompanyId = CurrentUserCompanyID; ucProvince1.IsFav = true; ucCity1.CompanyId = CurrentUserCompanyID; ucCity1.IsFav = true; #endregion EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer(); //客户资料bll EyouSoft.Model.CompanyStructure.CustomerInfo custModel = null; //客户资料实体 string method = Utils.GetFormValue("hidMethod"); //当前操作 int custId = Utils.GetInt(Utils.GetQueryStringValue("custId")); //客户Id string type = Utils.GetQueryStringValue("type"); if (type == "show") { isshow = true; } EyouSoft.BLL.CompanyStructure.CompanyUser user = new EyouSoft.BLL.CompanyStructure.CompanyUser(); if (method == "save") { #region 保存客户资料 custModel = new EyouSoft.Model.CompanyStructure.CustomerInfo(); custModel.Name = Utils.InputText(txtCompany.Value); //单位名称 custModel.Licence = Utils.InputText(txtLicense.Value); //许可证号 custModel.Adress = Utils.InputText(txtAddress.Value); //地址 custModel.PostalCode = Utils.InputText(txtPostalCode.Value); //邮编 custModel.BankAccount = Utils.InputText(txtBankCode.Value); //银行账号 custModel.PreDeposit = Utils.GetDecimal(Utils.InputText(txtBeforeMoney.Value)); //预存款 custModel.MaxDebts = Utils.GetDecimal(Utils.InputText(txtArrears.Value)); //最高欠款 custModel.CommissionType = (EyouSoft.Model.EnumType.CompanyStructure.CommissionType)Utils.GetInt(Utils.InputText(rdiBackType.SelectedValue)); //反佣类型 custModel.CommissionCount = Utils.GetDecimal(Utils.InputText(txtBackMoney.Value)); //反佣金额 custModel.CustomerLev = Utils.GetInt(Utils.GetFormValue(selCustLevel.UniqueID)); //客户等级 custModel.JieSuanType = (EyouSoft.Model.EnumType.CompanyStructure.KHJieSuanType)Utils.GetInt(ddl_checkType.SelectedValue); custModel.IsRequiredTourCode = rad_IsShowGroupNo.SelectedValue == "true" ? true : false; //ddl_checkType //结算日期 if (Utils.GetFormValue("AccountTypeRadio") == "1") { custModel.AccountDayType = EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Month; custModel.AccountDay = Utils.GetInt(Utils.GetFormValue(AccountDaylist.UniqueID)); } else { custModel.AccountDayType = EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Week; custModel.AccountDay = Utils.GetInt(Utils.GetFormValue("checkDay")); } custModel.AccountWay = Utils.InputText(Utils.GetFormValue(AccountType.UniqueID)); //结算方式 custModel.ContactName = Utils.InputText(txtMainContact.Value); //主要联系人 custModel.Phone = Utils.InputText(txtMainTel.Value); //电话 custModel.Mobile = Utils.InputText(txtMainMobile.Value); //手机 custModel.Fax = Utils.InputText(txtMainFax.Value); //传真 custModel.Remark = Utils.InputText(txtRemark.Value); //备注 custModel.ProviceId = this.ucProvince1.ProvinceId; custModel.CityId = this.ucCity1.CityId; custModel.ProvinceName = Utils.GetFormValue("pName"); if (custModel.ProvinceName == "请选择") { custModel.ProvinceName = ""; } custModel.CityName = Utils.GetFormValue("cName"); if (custModel.CityName == "请选择") { custModel.CityName = ""; } custModel.CompanyId = CurrentUserCompanyID; custModel.SaleId = Utils.GetInt(Utils.GetFormValue(selDutySaler.UniqueID)); custModel.Saler = Utils.GetFormValue("hidSaler"); custModel.IssueTime = DateTime.Now; custModel.IsEnable = true; custModel.IsDelete = false; custModel.BrandId = Utils.GetInt(Utils.GetFormValue(selBrand.UniqueID)); string showMess = "数据保存成功!"; string[] contactId = Utils.GetFormValues("contactId"); string[] custName = Utils.GetFormValues("txtContact"); //姓名 string[] custSex = Utils.GetFormValues("selSex"); //性别 string[] custDepart = Utils.GetFormValues("txtDepart"); //部门 string[] custBirth = Utils.GetFormValues("txtBirth"); //生日 string[] custDuty = Utils.GetFormValues("txtDuty"); //职务 string[] custMobile = Utils.GetFormValues("txtMobile"); //手机 string[] custTel = Utils.GetFormValues("txtTel"); //电话 string[] cusFax = Utils.GetFormValues("txtFax"); //传真 string[] custQQ = Utils.GetFormValues("txtQQ"); //QQ string[] custEmail = Utils.GetFormValues("txtEmail"); //用户邮箱 string[] custUserName = Utils.GetFormValues("txtUserName"); //用户名 string[] custUserId = Utils.GetFormValues("userId"); //用户ID string[] custPwd = Utils.GetFormValues("txtPwd"); //密码 string[] custPwdSure = Utils.GetFormValues("txtPwdSure"); //确认密码 string[] splitStr = new string[] { "|," }; string[] custAreaId = Utils.GetFormValue("custHidArea").Split(splitStr, StringSplitOptions.None); //线路区域 string[] custAreaName = Utils.GetFormValue("txtRouteArea").Split(splitStr, StringSplitOptions.None); //线路区域 IList <EyouSoft.Model.CompanyStructure.CustomerContactInfo> custList = new List <EyouSoft.Model.CompanyStructure.CustomerContactInfo>(); StringBuilder repartUserName = new StringBuilder(); for (int i = 0, len = custName.Length; i < len; i++) { if (i == 0 && string.IsNullOrEmpty(custName[i]) || custName[i] == "") { continue; } if (String.IsNullOrEmpty(custName[i])) { MessageBox.ShowAndRedirect(this, "请填写完整姓名!", this.Request.Url.ToString()); break; } if (custUserId[i] == "0") { if (user.IsExists(0, custUserName[i], CurrentUserCompanyID)) { repartUserName.AppendFormat("{0},", custUserName[i]); //continue; } } EyouSoft.Model.CompanyStructure.CustomerContactInfo custInfo = new EyouSoft.Model.CompanyStructure.CustomerContactInfo(); custInfo.BirthDay = Utils.GetDateTime(custBirth[i], DateTime.Now); custInfo.Department = custDepart[i]; custInfo.IsDelete = "0"; custInfo.Email = string.Empty; custInfo.Job = custDuty[i]; custInfo.Mobile = custMobile[i]; custInfo.Tel = custTel[i]; custInfo.Fax = cusFax[i]; custInfo.ID = Utils.GetInt(contactId[i]); custInfo.Name = custName[i]; custInfo.qq = custQQ[i]; custInfo.Sex = custSex[i]; custModel.IssueTime = DateTime.Now; if (!user.IsExists(Utils.GetInt(custUserId[i]), custUserName[i], CurrentUserCompanyID) || Utils.GetInt(custUserId[i]) != 0) { custInfo.UserAccount = new EyouSoft.Model.CompanyStructure.UserAccount(); custInfo.UserAccount.CompanyId = CurrentUserCompanyID; custInfo.UserAccount.UserName = custUserName[i]; custInfo.UserAccount.UserAreaList = new List <EyouSoft.Model.CompanyStructure.UserArea>(); string areaIds = custAreaId[i].Trim('|'); string areaNames = custAreaName[i].Trim('|'); custInfo.AreaIds = areaIds; custInfo.AreaNames = areaNames; custInfo.UserAccount.PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord { NoEncryptPassword = custPwd[i] }; } custList.Add(custInfo); } custModel.CustomerContactList = custList; string strRepeat = repartUserName.ToString().TrimEnd(','); bool result = false; int resultInt = 0; if (custId != 0) { //修改 custModel.Id = custId; resultInt = custBll.UpdateCustomer(custModel); result = resultInt == 1 || resultInt == 9; var splitStr2 = new string[] { "," }; string[] delIds = Utils.GetFormValue("delIds").Split(splitStr2, StringSplitOptions.RemoveEmptyEntries); if (delIds.Length > 0) { result = custBll.DeleteCustomerContacter(delIds); } } else { //添加 resultInt = custBll.AddCustomer(custModel); result = resultInt == 1 || resultInt == 9; } if (!result) { showMess = "数据保存失败"; } else { if (strRepeat != "") { showMess = strRepeat + "账户已经存在将不会添加!"; } } Utils.ShowMsgAndCloseBoxy(showMess, Utils.GetQueryStringValue("iframeId"), true); //MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/CRM/customerinfos/CustomerList.aspx';window.parent.Boxy.getIframeDialog('{1}').hide()", showMess, Utils.GetQueryStringValue("iframeId"))); #endregion } else { #region 初始化加载客户资料 EyouSoft.BLL.CompanyStructure.CompanyBrand brandBll = new EyouSoft.BLL.CompanyStructure.CompanyBrand(); int recordCount = 0; //初始化绑定品牌列表 IList <EyouSoft.Model.CompanyStructure.CompanyBrand> listB = brandBll.GetList(100000, 1, ref recordCount, CurrentUserCompanyID); selBrand.DataTextField = "BrandName"; selBrand.DataValueField = "Id"; selBrand.DataSource = listB; selBrand.DataBind(); selBrand.Items.Insert(0, new ListItem("请选择", "")); //初始化绑定客户等级列表 EyouSoft.BLL.CompanyStructure.CompanyCustomStand customStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();//初始化custbll IList <EyouSoft.Model.CompanyStructure.CustomStand> list = customStandBll.GetList(100000, 1, ref recordCount, CurrentUserCompanyID); selCustLevel.DataTextField = "CustomStandName"; selCustLevel.DataValueField = "Id"; selCustLevel.DataSource = list; selCustLevel.DataBind(); selCustLevel.Items.Insert(0, new ListItem("请选择", "")); //初始化绑定部门员工列表 EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(); IList <EyouSoft.Model.CompanyStructure.CompanyUser> userList = userBll.GetCompanyUser(CurrentUserCompanyID); if (userList != null && userList.Count > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyUser userItem in userList) { selDutySaler.Items.Add(new ListItem(userItem.PersonInfo.ContactName, userItem.ID.ToString())); } } selDutySaler.Items.Insert(0, new ListItem("请选择", "")); //判断是否有分配账号权限(隐藏或显示分配账号按钮) if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_分配帐号)) { hasAccountPermit = true; } if (custId != 0) { //初始化数据获取客户资料实体 custModel = custBll.GetCustomerModel(custId); if (custModel != null) { IsStartState = custModel.IsEnable; txtCompany.Value = custModel.Name; //单位名称 txtLicense.Value = custModel.Licence; //许可证号 txtAddress.Value = custModel.Adress; //地址 txtPostalCode.Value = custModel.PostalCode; //邮编 txtBankCode.Value = custModel.BankAccount; //银行账号 txtBeforeMoney.Value = custModel.PreDeposit.ToString("F2"); //预存款 txtArrears.Value = custModel.MaxDebts.ToString("F2"); //最高欠款 rdiBackType.SelectedValue = ((int)custModel.CommissionType).ToString(); //反佣类型 txtBackMoney.Value = custModel.CommissionCount.ToString("F2"); //反佣金额 selCustLevel.Value = custModel.CustomerLev.ToString(); //客户等级 ddl_checkType.SelectedValue = ((int)custModel.JieSuanType).ToString(); rad_IsShowGroupNo.SelectedValue = (bool)custModel.IsRequiredTourCode ? "true" : "false"; //结算日期 按周 if (custModel.AccountDayType == EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Week) { this.AccountTypeRadio1.Checked = false; this.AccountTypeRadio2.Checked = true; this.AccountDaylist.Attributes.Add("disabled", "disabled"); if (custModel.AccountDay != 0) { switch (custModel.AccountDay) { case 1: this.checkDay1.Checked = true; break; case 2: this.checkDay1.Checked = false; this.checkDay2.Checked = true; break; case 3: this.checkDay1.Checked = false; this.checkDay3.Checked = true; break; case 4: this.checkDay1.Checked = false; this.checkDay4.Checked = true; break; case 5: this.checkDay1.Checked = false; this.checkDay5.Checked = true; break; case 6: this.checkDay1.Checked = false; this.checkDay6.Checked = true; break; case 7: this.checkDay1.Checked = false; this.checkDay7.Checked = true; break; } } }//按每月X几 else { this.AccountTypeRadio1.Checked = true; this.AccountTypeRadio2.Checked = false; this.checkDay1.Attributes.Add("disabled", "disabled"); this.checkDay3.Attributes.Add("disabled", "disabled"); this.checkDay2.Attributes.Add("disabled", "disabled"); this.checkDay4.Attributes.Add("disabled", "disabled"); this.checkDay5.Attributes.Add("disabled", "disabled"); this.checkDay6.Attributes.Add("disabled", "disabled"); this.checkDay7.Attributes.Add("disabled", "disabled"); if (custModel.AccountDay != 0) { this.AccountDaylist.Items.FindByValue(custModel.AccountDay.ToString()).Selected = true; } } //结算方式 this.AccountType.Value = custModel.AccountWay; txtMainContact.Value = custModel.ContactName; //主要联系人 txtMainTel.Value = custModel.Phone; //电话 txtMainMobile.Value = custModel.Mobile; //手机 txtMainFax.Value = custModel.Fax; //传真 txtRemark.Value = custModel.Remark; //备注 selBrand.Value = custModel.BrandId.ToString(); //品牌 selDutySaler.Value = custModel.SaleId.ToString(); //责任销售 ucProvince1.ProvinceId = custModel.ProviceId; //省份 ucCity1.CityId = custModel.CityId; //城市 ucCity1.ProvinceId = custModel.ProviceId; //获取联系人集合 IList <EyouSoft.Model.CompanyStructure.CustomerContactInfo> custList = custModel.CustomerContactList; if (custList != null && custList.Count > 0) { GetContactHtml(custList); } //如果有修改权限则显示保存按钮 if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_修改客户)) { HasPermit = true; } } } else { //如果有新增权限则显示保存按钮 if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_新增客户)) { HasPermit = true; } } #endregion } }
/// <summary> /// 保存或修改信息 /// </summary> private void Save() { tid = Utils.GetInt(Utils.GetFormValue("tid")); if (tid > 0) { csModel = csBll.GetModel(tid, this.CurrentUserCompanyID); } else { csModel.SupplierType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接; } //省份编号 csModel.ProvinceId = this.ucProvince1.ProvinceId; //身份名称 csModel.ProvinceName = Utils.GetFormValue("proname"); //城市名称 csModel.CityName = Utils.GetFormValue("cityname"); //城市编号 csModel.CityId = this.ucCity1.CityId; //单位名称 csModel.UnitName = Utils.GetFormValue("unionname"); if (csModel.UnitName.Length == 1) { csModel.UnitName += " "; } //地址 csModel.UnitAddress = Utils.GetFormValue("txtAddress"); //合作协议 if (Request.Files.Count > 0) { string filepath = string.Empty; string oldfilename = string.Empty; bool result = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["workAgree"], "SupplierControlFile", out filepath, out oldfilename); if (result) { csModel.AgreementFile = filepath; } } //许可证号 csModel.LicenseKey = Utils.GetFormValue("txtLicense"); //返佣 csModel.Commission = Utils.GetDecimal(Utils.GetFormValue("txtReturnSet")); //备注 csModel.Remark = Utils.GetFormValue("remark"); //公司编号 csModel.CompanyId = this.SiteUserInfo.CompanyID; //操作人 csModel.OperatorId = this.SiteUserInfo.ID; //供应商联系人 csModel.SupplierContact = new List <EyouSoft.Model.CompanyStructure.SupplierContact>(); string[] accmanId = Utils.GetFormValues("hidcontactid");//联系人ID string[] accmanname = Utils.GetFormValues("inname"); string[] accmandate = Utils.GetFormValues("indate"); string[] accmanphone = Utils.GetFormValues("inphone"); string[] accmanmobile = Utils.GetFormValues("inmobile"); string[] accmanfax = Utils.GetFormValues("infax"); string[] accmanqq = Utils.GetFormValues("inqq"); string[] accmanUserName = Utils.GetFormValues("inusername"); //用户名 string[] accmanPwd = Utils.GetFormValues("inpwd"); //密码 string[] accmanUserId = Utils.GetFormValues("inusernameid"); //用户ID for (int i = 0; i < accmanname.Length; i++) { EyouSoft.Model.CompanyStructure.SupplierContact scModel = new EyouSoft.Model.CompanyStructure.SupplierContact(); scModel.ContactName = accmanname[i]; scModel.JobTitle = accmandate[i]; scModel.ContactTel = accmanphone[i]; scModel.ContactMobile = accmanmobile[i]; scModel.QQ = accmanqq[i]; scModel.ContactFax = accmanfax[i]; scModel.SupplierType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接; scModel.Id = Utils.GetInt(accmanId[i]); //联系人ID //判断对应联系人的用户名是否为空 if (!string.IsNullOrEmpty(accmanUserName[i])) //不为空 { scModel.UserAccount = new EyouSoft.Model.CompanyStructure.UserAccount() { ID = Utils.GetInt(accmanUserId[i]), UserName = accmanUserName[i], PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord() { NoEncryptPassword = accmanPwd[i] }, TourCompanyId = tid }; } else//为空 { //将当前联系人的用户信息初始化为空 scModel.UserAccount = null; } csModel.SupplierContact.Add(scModel); } //判断用户信息中 是否存在用户名已被使用 bool isUserNameExist = false; System.Text.StringBuilder strbUserName = new System.Text.StringBuilder(); EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo); foreach (EyouSoft.Model.CompanyStructure.SupplierContact scModel in csModel.SupplierContact) { //判断当前用户信息 ,是否是 新增的用户信息 if (scModel.UserAccount != null && scModel.UserAccount.ID == 0)//是 { //判断用户名 是否已经存在 if (userBll.IsExists(0, scModel.UserAccount.UserName, CurrentUserCompanyID) == true)//是 { //修改状态 isUserNameExist = true; //添加重复的用户名到strbUsername strbUserName.Append(scModel.UserAccount.UserName).Append(","); } } } //去除strbUserName中最后一个多余的【,】逗号 if (strbUserName.Length > 0) { strbUserName.Remove(strbUserName.Length - 1, 1); } bool res = false; if (tid > 0) { res = csBll.UpdateSupplierInfo(csModel); } else { res = csBll.AddSupplierInfo(csModel); } string msg = ""; //提示信息 if (isUserNameExist == true) //如果存在用户名重复 { msg = "地接信息保存成功,新增的用户名中,(" + strbUserName.ToString() + ")已被使用,请更换其他用户名"; } else { msg = "地接信息保存成功"; } if (res) { MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.Boxy.getIframeDialog('{1}').hide();{2}", msg, Utils.GetQueryStringValue("iframeId"), tid > 0 ? "window.parent.location.reload();" : "window.parent.location.href='/SupplierControl/AreaConnect/AreaConnect.aspx';")); } else { MessageBox.ResponseScript(this, ";alert('保存失败!');"); } }
/// <summary> /// 绑定数据 /// </summary> void BindXC() { tabxcquick.Visible = false; tabProject.Visible = false; tabProject20.Visible = false; //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明散拼计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(Utils.GetQueryStringValue("tourId")); if (model != null) { #region 标准,快速 公有数据 xcTime = model.LDate; lblGoTraffic.Text = model.LTraffic; lblEndTraffic.Text = model.RTraffic; lblTid.Text = model.TourCode; #endregion #region 组团社联系信息 this.lblSetMan.Text = model.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(model.BuyerCId); if (cusModel != null) { //组团 联系人电话 this.lblSetPhone.Text = cusModel.Phone; this.lblSetPhone2.Text = cusModel.Phone; //组团联系人Fax this.lblSetFAX.Text = cusModel.Fax; this.lblSetMan.Text = cusModel.Name; this.lblSetMan2.Text = cusModel.Name; this.lblSetName.Text = cusModel.ContactName; } #endregion #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(model.OperatorId); if (userInfoModel != null) { ////主要联系人电话 //this.lblGetMan.Text = userInfoModel.ContactTel; ////专线FAX //this.lblGetFAX.Text = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(model.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.lblGetPhone.Text = companyModel.ContactTel; this.lblGetPhone2.Text = companyModel.ContactTel; this.lblGetMan.Text = companyModel.CompanyName; this.lblGetMan2.Text = companyModel.CompanyName; this.lblGetName.Text = companyModel.ContactName; this.lblGetFAX.Text = companyModel.ContactFax; } } #endregion if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { #region 标准发布 if (model.TourNormalInfo != null) { this.lblLineName.Text = model.RouteName == "" ? "" : model.RouteName; this.lblDaySum.Text = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString(); this.lblGoTraffic.Text = model.LTraffic; this.lblEndTraffic.Text = model.RTraffic; this.lblManSum.Text = model.PlanPeopleNumber.ToString(); if (model.TourNormalInfo.Plans != null && model.TourNormalInfo.Plans.Count > 0) { xc_list.DataSource = model.TourNormalInfo.Plans; xc_list.DataBind(); } lblBuHanXiangMu.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); lblZiFeiXIangMu.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); lblErTongAnPai.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); lblGouWuAnPai.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); lblZhuYiShiXiang.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); lblTotalAmount.Text = model.TotalAmount.ToString("#0.00") + "元"; lblGatheringPlace.Text = model.GatheringPlace; lblGatheringTime.Text = model.GatheringTime; if (model.Services != null && model.Services.Count > 0) { rpt_sList.DataSource = model.Services; rpt_sList.DataBind(); sListRowsCount = model.Services.Count; } tabProject.Visible = true; tabProject20.Visible = true; } #endregion } else { #region 快速发布 tabxcquick.Visible = true; this.lblLineName.Text = model.RouteName == "" ? "" : model.RouteName; this.lblDaySum.Text = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString(); this.lblGoTraffic.Text = model.LTraffic; this.lblEndTraffic.Text = model.RTraffic; this.lblManSum.Text = model.PlanPeopleNumber.ToString(); if (model.TourQuickInfo != null) { lblKs.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourQuickInfo.Remark); lblQuickPlan.Text = model.TourQuickInfo.QuickPlan; } #endregion } } else { Response.Clear(); Response.Write("未找到信息"); Response.End(); } }
protected string Orderbyid = string.Empty; //排序编号 protected void Page_Load(object sender, EventArgs e) { BindSellerlist(); if (!IsPostBack) { //初始化绑定部门员工列表 EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(); IList <EyouSoft.Model.CompanyStructure.CompanyUser> userList = userBll.GetCompanyUser(CurrentUserCompanyID); if (userList != null && userList.Count > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyUser userItem in userList) { ddlSalePeople.Items.Add(new ListItem(userItem.PersonInfo.ContactName, userItem.ID.ToString())); } } ddlSalePeople.Items.Insert(0, new ListItem("请选择", "")); } #region 判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.客户关系管理_客户资料_栏目, true); return; } if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_停用帐号)) { IsStop = true; } if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_删除客户)) { IsDelete = true; } if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_修改客户)) { IsUpdate = true; } if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_新增客户)) { IsAdd = true; } if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_导入客户)) { IsImportIn = true; } if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_导出客户)) { IsImportOut = true; } #endregion i = Utils.GetInt(Utils.GetFormValue("ids")); EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer(); //客户bll pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); //页码 bool result = false; //操作结果 #region 当前操作 string method = Utils.GetFormValue("method"); if (method == "del") { //删除 获取客户信息所有的编号集合 string ids = Utils.GetFormValue("ids"); string[] idlist = ids.Split(','); if (idlist.Length > 0) { for (int k = 0; k < idlist.Length - 1; k++) { result = custBll.DeleteCustomer(Utils.GetInt(idlist[k])); } } Utils.ResponseMeg(result, result ? "删除成功!" : "删除失败!"); return; } if (method == "stop") { //停用 string ids = Utils.GetFormValue("ids"); result = custBll.StopIt(Utils.GetInt(ids)); Utils.ResponseMeg(result, result ? "已停用!" : "停用失败!"); return; } if (method == "start") { //启用 string ids = Utils.GetFormValue("ids"); result = custBll.StartId(Utils.GetInt(ids)); Utils.ResponseMeg(result, result ? "已启用!" : "启用失败!"); return; } #endregion #region 查询参数 string contacter = Utils.InputText(Request.QueryString["contacter"] == null ? "" : Server.UrlDecode(Request.QueryString["contacter"])); //联系人 int[] provinceIds = Utils.GetIntArray(Utils.GetQueryStringValue("province"), ","); //省份 int[] cityIds = Utils.GetIntArray(Utils.GetQueryStringValue("city"), ","); //城市 string saler = Utils.InputText(Request.QueryString["saler"] == null ? "" : Server.UrlDecode(Request.QueryString["saler"])); //责任销售 string companyName = Utils.InputText(Request.QueryString["saler"] == null ? "" : Server.UrlDecode(Request.QueryString["companyName"])); //单位名称 string telephone = Utils.GetQueryStringValue("telephone"); #endregion int pageCount = 1; //页数 IList <EyouSoft.Model.CompanyStructure.CustomerInfo> list = null; //客户资料集合 #region 导出客户Excel //导出Excel if (Utils.GetQueryStringValue("method") == "downexcel") { string strPageSize = Utils.GetQueryStringValue("recordcount"); pageSize = Utils.GetInt(strPageSize == "0" ? "1" : strPageSize);//导出游客时获取全部的查询数据 list = custBll.SearchCustomerList(pageSize, pageIndex, CurrentUserCompanyID, provinceIds, cityIds, companyName, contacter, saler, ref recordCount, ref pageCount, telephone); DownLoadExcel(list); return; } #endregion #region 绑定客户列表 //客户资料排序实体 EyouSoft.Model.CompanyStructure.MCustomerSeachInfo Seachinfo = new EyouSoft.Model.CompanyStructure.MCustomerSeachInfo(); //排序方式 int order = Utils.GetInt(Utils.GetQueryStringValue("order")); if (order == 0) { //绑定客户列表 list = custBll.SearchCustomerList(pageSize, pageIndex, CurrentUserCompanyID, provinceIds, cityIds, companyName, contacter, saler, ref recordCount, ref pageCount, telephone); if (list != null && list.Count > 0) { rptCustomer.DataSource = list; rptCustomer.DataBind(); BindExportPage(); } else { rptCustomer.EmptyText = "<tr><td colspan='10' align='center'>对不起,暂无客户资料信息!</td></tr>"; ExportPageInfo1.Visible = false; } } else { #region 标题排序 switch (order) { case 1: Orderbyid = "1"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.客户名称; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 2: Orderbyid = "2"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.客户名称; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 3: Orderbyid = "3"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人名称; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 4: Orderbyid = "4"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人名称; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 5: Orderbyid = "5"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人电话; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 6: Orderbyid = "6"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人电话; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 7: Orderbyid = "7"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人手机; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 8: Orderbyid = "8"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人手机; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 9: Orderbyid = "9"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人传真; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 10: Orderbyid = "10"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.主要联系人传真; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 11: Orderbyid = "11"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.责任销售; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 12: Orderbyid = "12"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.责任销售; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 13: Orderbyid = "13"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.交易次数; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 14: Orderbyid = "14"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.交易次数; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 17: Orderbyid = "17"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.结算方式; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 18: Orderbyid = "18"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.结算方式; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 19: Orderbyid = "19"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.省份; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 20: Orderbyid = "20"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.省份; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 21: Orderbyid = "21"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.地址; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.ASC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; case 22: Orderbyid = "22"; Seachinfo.OrderByField = EyouSoft.Model.EnumType.CompanyStructure.CustomerOrderByField.地址; Seachinfo.OrderByType = EyouSoft.Model.EnumType.CompanyStructure.OrderByType.DESC; list = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomers(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount, Seachinfo); break; } #endregion if (list != null && list.Count > 0) { rptCustomer.DataSource = list; rptCustomer.DataBind(); BindExportPage(); } else { rptCustomer.EmptyText = "<tr><td colspan='10' align='center'>对不起,暂无客户资料信息!</td></tr>"; ExportPageInfo1.Visible = false; } } #endregion //恢复查询关键字 txtCompanyName.Value = companyName; //公司名 txtContact.Value = contacter; //联系人 this.ddlSalePeople.SelectedValue = saler; //责任销售人 }
void Bind() { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); string tourId = Utils.GetQueryStringValue("tourId"); if (tourId == "") { Response.Write("未找到信息!"); return; } //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo basemodel = bll.GetTourInfo(tourId); LeaveDate = basemodel.LDate; lt_LDate.Text = basemodel.LDate.Month.ToString() + "月" + basemodel.LDate.Day.ToString() + "日" + basemodel.TourType.ToString(); lt_TourName.Text = basemodel.RouteName; #region 组团端 EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(basemodel.BuyerCId); if (cusModel != null) { txt_to_fax.Text = cusModel.Fax; txt_to_name.Text = cusModel.Name; txt_to_tel.Text = cusModel.Phone; txt_to_user.Text = cusModel.ContactName; } #endregion #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(basemodel.OperatorId); if (userInfoModel != null) { //主要联系人电话 this.txt_fr_tel.Text = userInfoModel.ContactTel; //专线FAX this.txt_fr_fax.Text = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(basemodel.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.txt_fr_user.Text = companyModel.ContactName; txt_fr_name.Text = companyModel.CompanyName; txt_fr_tel.Text = companyModel.ContactTel; txt_fr_tel.Text = companyModel.ContactFax; } } #endregion if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)basemodel; if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { tb_normal.Visible = true; rptTravel.DataSource = model.TourNormalInfo.Plans; rptTravel.DataBind(); rptProject.DataSource = model.TourNormalInfo.Services; rptProject.DataBind(); div_noproject.Visible = true; lblNoProject.Text = TextToHtml(model.TourNormalInfo.BuHanXiangMu); div_notice.Visible = true; lt_notice.Text = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); } else { tb_normal.Visible = false; tb_quick.Visible = true; tb_quickService.Visible = true; lb_Quick.Text = model.TourQuickInfo.QuickPlan; lt_service.Text = model.TourQuickInfo.Service; } } else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)basemodel; if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { tb_normal.Visible = true; if (model.TourNormalInfo != null) { rptTravel.DataSource = model.TourNormalInfo.Plans; rptTravel.DataBind(); rptProject.DataSource = model.Services; rptProject.DataBind(); div_noproject.Visible = true; lblNoProject.Text = TextToHtml(model.TourNormalInfo.BuHanXiangMu); div_notice.Visible = true; lt_notice.Text = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); } } else { if (model.TourQuickInfo != null) { tb_normal.Visible = false; tb_quick.Visible = true; tb_quickService.Visible = true; lb_Quick.Text = model.TourQuickInfo.QuickPlan; lt_service.Text = model.TourQuickInfo.Service; } } /*#region 结算价 * 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.txt_Money.Text = money; #endregion*/ } else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { p_title.Visible = false; d_title.Visible = false; Title = "单项服务确认单"; tb_single.Visible = true; tb_normal.Visible = false; EyouSoft.Model.TourStructure.TourSingleInfo model = (EyouSoft.Model.TourStructure.TourSingleInfo)basemodel; rpt_single.DataSource = model.Plans; rpt_single.DataBind(); txt_Money.Text = model.TotalAmount.ToString("#,##0.00"); } if (basemodel.TourType != EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { phJieSuanJiaGe.Visible = true; EyouSoft.BLL.PlanStruture.TravelAgency planbll = new EyouSoft.BLL.PlanStruture.TravelAgency(); IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> agencys = planbll.GetList(tourId); planbll = null; if (agencys != null && agencys.Count > 0) { System.Text.StringBuilder s = new System.Text.StringBuilder(); foreach (var agency in agencys) { s.AppendFormat("单位名称:{0} 结算费用:{1} ", agency.LocalTravelAgency, Utils.FilterEndOfTheZeroDecimal(agency.Settlement)); } txt_Money.Text = s.ToString(); } } }
protected int itemIndex;//序号 protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_系统日志_系统日志栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_系统日志_系统日志栏目, true); return; } pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); itemIndex = (pageIndex - 1) * pageSize + 1; EyouSoft.BLL.CompanyStructure.SysHandleLogs logBll = new EyouSoft.BLL.CompanyStructure.SysHandleLogs();//日志bll //获取查询条件 string operatorId = Utils.GetQueryStringValue("operator"); string startDate = Utils.GetQueryStringValue("startDate"); string endDate = Utils.GetQueryStringValue("endDate"); string departId = Utils.GetQueryStringValue("departId"); EyouSoft.BLL.CompanyStructure.Department departBll = new EyouSoft.BLL.CompanyStructure.Department();//部门bll //绑定部门列表 IList <EyouSoft.Model.CompanyStructure.Department> departList = departBll.GetAllDept(CurrentUserCompanyID); if (departList != null && departList.Count > 0) { selDeaprt.DataTextField = "DepartName"; selDeaprt.DataValueField = "Id"; selDeaprt.DataSource = departList; selDeaprt.DataBind(); } selDeaprt.Items.Insert(0, new ListItem("请选择", "0")); //绑定操作员列表 EyouSoft.BLL.CompanyStructure.CompanyUser userBll = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo);//初始化bll IList <EyouSoft.Model.CompanyStructure.CompanyUser> userlist = userBll.GetCompanyUser(CurrentUserCompanyID); if (userlist != null && userlist.Count > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyUser user in userlist) { selOperator.Items.Add(new ListItem(user.PersonInfo.ContactName, user.ID.ToString())); } } selOperator.Items.Insert(0, new ListItem("请选择", "0")); //日志查询试实体 EyouSoft.Model.CompanyStructure.QueryHandleLog queryLog = new EyouSoft.Model.CompanyStructure.QueryHandleLog(); queryLog.CompanyId = CurrentUserCompanyID; //公司编号 queryLog.DepartId = Utils.GetInt(departId); //部门编号 queryLog.HandEndTime = Utils.GetDateTimeNullable(endDate); //操作结束时间 queryLog.HandStartTime = Utils.GetDateTimeNullable(startDate); //操作开始时间 queryLog.OperatorId = Utils.GetInt(operatorId); //操作员 //绑定日志列表 IList <EyouSoft.Model.CompanyStructure.SysHandleLogs> list = logBll.GetList(pageSize, pageIndex, ref recordCount, queryLog); if (list != null && list.Count > 0) { rptLog.DataSource = list; rptLog.DataBind(); BindExportPage(); } else { rptLog.EmptyText = "<tr><td colspan='10' align='center'>对不起,暂无日志信息!</td></tr>"; ExportPageInfo1.Visible = false; } //恢复查询关键字 txtEndDate.Value = endDate; //操作结束时间 selOperator.Value = operatorId; //操作员 txtStartDate.Value = startDate; //操作开始时间 selDeaprt.Value = departId; //部门编号 }