Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //控件初始化
                LoadVisitors1.CurrentPageIframeId = Utils.GetQueryStringValue("iframeid");

                string orderId = Utils.GetQueryStringValue("orderId");
                string tourId  = Utils.GetQueryStringValue("tourId");
                #region 配置游客是否必填
                EyouSoft.BLL.CompanyStructure.CompanySetting        setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //初始化bll
                EyouSoft.Model.CompanyStructure.CompanyFieldSetting set    = null;                                               //配置实体
                set = setBll.GetSetting(CurrentUserCompanyID);
                hd_IsRequiredTraveller.Value = set.IsRequiredTraveller.ToString();
                #endregion
                if (orderId != "")
                {
                    this.hideOrderId.Value = orderId;
                }
                if (tourId != "")
                {
                    DataInit(tourId);
                }
            }
        }
Example #2
0
        protected string file;  //页面上附件的路径
        protected void Page_Load(object sender, EventArgs e)
        {
            //询价权限判断
            if (!CheckGrant(TravelPermission.团队计划_组团社询价_栏目))
            {
                Utils.ResponseNoPermit(TravelPermission.团队计划_组团社询价_栏目, true);
            }
            int    id  = 0;
            string ids = "";

            this.xianluWindow1.publishType = 1;
            type = Utils.GetQueryStringValue("type");
            if (!IsPostBack)
            {
                if (type == "create")
                {
                    id = Utils.GetInt(Utils.GetQueryStringValue("id"));
                    InitInfo(id);
                }
                else if (type == "del")
                {
                    ids = Utils.GetQueryStringValue("ids");
                    Del(ids);
                }
                BindArea();
                #region 配置
                EyouSoft.BLL.CompanyStructure.CompanySetting        setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //初始化bll
                EyouSoft.Model.CompanyStructure.CompanyFieldSetting set    = setBll.GetSetting(CurrentUserCompanyID);            //配置实体
                hd_IsRequiredTraveller.Value = set.IsRequiredTraveller.ToString();
                #endregion
            }
        }
Example #3
0
        /// <summary>
        /// 初始化芭比来系统系统配置
        /// </summary>
        private void InitBBLSysSetting()
        {
            EyouSoft.BLL.CompanyStructure.CompanySetting        settingbll = new EyouSoft.BLL.CompanyStructure.CompanySetting();
            EyouSoft.Model.CompanyStructure.CompanyFieldSetting setting    = settingbll.GetSetting(1);
            settingbll = null;
            //var setting1 = (EyouSoft.Model.CompanyStructure.CompanyFieldSetting)setting.Clone();

            string script = string.Empty;

            if (setting != null)
            {
                /*if (setting.PrintDocument != null && setting.PrintDocument.Count > 0)
                 * {
                 *  foreach (var item in setting.PrintDocument)
                 *  {
                 *      if (string.IsNullOrEmpty(item.PrintTemplate)) continue;
                 *      item.PrintTemplate = item.PrintTemplate.ToLower().Replace("/print/bbl/", "/print/normal/");
                 *  }
                 * }*/

                script = "var sysSetting={0};";
                script = string.Format(script, Newtonsoft.Json.JsonConvert.SerializeObject(setting));
                this.RegisterScript(script);
            }
            else
            {
                this.RegisterScript("var sysSetting=null;");
            }
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadVisitors1.CurrentPageIframeId = Utils.GetQueryStringValue("iframeId");// Request.QueryString["iframeId"];
            if (!IsPostBack)
            {
                #region 获取客户单位的责任销售
                if (Utils.GetQueryStringValue("act") == "getSeller")
                {
                    Response.Clear();
                    int comId = Utils.GetInt(Utils.GetQueryStringValue("comId"));
                    EyouSoft.BLL.CompanyStructure.Customer       custBll  = new EyouSoft.BLL.CompanyStructure.Customer();
                    EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = custBll.GetCustomerModel(comId);
                    if (cusModel != null)
                    {
                        string        saler         = cusModel.Saler == null || cusModel.Saler == "" ? "暂无销售" : cusModel.Saler;
                        StringBuilder jsonNameAndId = new StringBuilder();
                        string        userList      = "";
                        jsonNameAndId.Append("[");
                        foreach (var vc in cusModel.CustomerContactList)
                        {
                            jsonNameAndId.Append("{\"Name\":\"" + vc.Name + "\",\"ID\":" + vc.ID + "},");
                        }
                        userList  = jsonNameAndId.ToString().TrimEnd(',');
                        userList += "]";
                        Response.Write("[{\"saler\":\"" + saler + "\",cusList:" + userList + ",\"CommissionType\":\"" + ((int)cusModel.CommissionType).ToString() + "\",CommissionCount:" + Utils.FilterEndOfTheZeroDecimal(cusModel.CommissionCount) + "}]");
                    }
                    Response.End();
                }


                #endregion

                BindXlInfo();
                BindPireList();
                strTraffic = GetSelectTraffic(-1);
                #region                                                                                                          //配置留位时间读取

                EyouSoft.BLL.CompanyStructure.CompanySetting        setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //初始化bll
                EyouSoft.Model.CompanyStructure.CompanyFieldSetting set    = null;                                               //配置实体
                set = setBll.GetSetting(CurrentUserCompanyID);
                txtEndTime.Attributes["onfocus"] = "WdatePicker({errDealMode:1,minDate:'" + DateTime.Now.ToString() + "',maxDate:'" + DateTime.Now.AddMinutes(set.ReservationTime).ToString() + "',dateFmt:'yyyy/MM/dd HH:mm',alwaysUseStartDate:true});";
                hd_waitTime.Value            = set.ReservationTime.ToString();
                hd_IsRequiredTraveller.Value = set.IsRequiredTraveller.ToString();
                #endregion
            }
            #region 获取关联交通成本价
            if (Utils.GetQueryStringValue("act") == "getPrice")
            {
                GetPrice();
            }
            #endregion
        }
Example #5
0
        /// <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);
        }
Example #6
0
        //同意留位
        protected void btnYes_Click(object sender, EventArgs e)
        {
            //点同意留位,状态为已留位
            EyouSoft.BLL.CompanyStructure.CompanySetting        setBll   = new EyouSoft.BLL.CompanyStructure.CompanySetting();
            EyouSoft.Model.CompanyStructure.CompanyFieldSetting setModel = setBll.GetSetting(SiteUserInfo.CompanyID);
            //留位时间
            DateTime seatDate = Utils.GetDateTime(txtEndTime.Text);

            if (setModel != null)
            {
                if (seatDate != DateTime.MinValue)
                {
                    if (seatDate > DateTime.Now.AddMinutes(Convert.ToDouble(setModel.ReservationTime)))
                    {
                        printFaiMsg(string.Format("留位时间最长到{0}", DateTime.Now.AddMinutes(setModel.ReservationTime)));

                        return;
                    }
                }
                else
                {
                    printFaiMsg("留位时间输入错误!");

                    return;
                }
            }
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo);
            string TourId = Utils.GetQueryStringValue("tourId");

            model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(TourId);

            #region 提交财务后不允许操作 by  txb 6.17
            if (model != null)
            {
                if (!Utils.PlanIsUpdateOrDelete(model.Status.ToString()))
                {
                    Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>");
                    return;
                }
            }
            #endregion
            if (model != null)
            {
                //EyouSoft.Model.EnumType.TourStructure.OrderState.已留位
                Save(false, seatDate);
            }

            bll   = null;
            model = null;
        }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 权限验证
            if (!CheckGrant(TravelPermission.统计分析_利润统计_利润统计栏目))
            {
                Utils.ResponseNoPermit(TravelPermission.统计分析_利润统计_利润统计栏目, true);
                return;
            }
            #endregion

            #region  根据Url参数,设置显示记录数
            if ((Request.QueryString["isAll"] != null && Utils.InputText(Request.QueryString["isAll"]) == "1") ||
                (Request.QueryString["isExport"] != null && Utils.InputText(Request.QueryString["isExport"]) == "1") ||
                Utils.GetInt(Utils.GetQueryStringValue("IsCartogram"), 0) > 0)
            {
                PageSize = int.MaxValue - 1;
            }
            #endregion

            #region 获取团队数URL
            EyouSoft.BLL.CompanyStructure.CompanySetting        setBll   = new EyouSoft.BLL.CompanyStructure.CompanySetting();
            EyouSoft.Model.CompanyStructure.CompanyFieldSetting setModel = setBll.GetSetting(SiteUserInfo.CompanyID);
            URL = setModel.ProfitStatTourPagePath;
            #endregion

            #region 初始化数据
            if (!IsPostBack)
            {
                InitProAreaStaticlist();
            }
            #endregion

            #region 导出报表
            if (Utils.GetQueryStringValue("isExport") == "1")
            {
                if (list != null && list.Count != 0)
                {
                    ToExcel(this.crp_PrintGetProAreaList, list);
                }
            }
            #endregion

            #region 统计图异步请求
            if (Utils.GetInt(Utils.GetQueryStringValue("IsCartogram"), 0) > 0)
            {
                GetCartogramFlashXml();
            }
            #endregion
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 权限验证
            if (!CheckGrant(TravelPermission.统计分析_利润统计_利润统计栏目))
            {
                Utils.ResponseNoPermit(TravelPermission.统计分析_利润统计_利润统计栏目, true);
                return;
            }
            #endregion

            #region 根据Url参数,来设置PageSize
            string IsPrint       = Request.QueryString["isAll"];
            string isExportValue = Request.QueryString["isExport"];
            if ((IsPrint != "" && IsPrint == "1") || (isExportValue != "" && isExportValue == "1"))
            {
                //设置显示的记录为最大值
                PageSize = int.MaxValue - 1;
            }
            #endregion

            //是否导出
            if (isExportValue != "" && isExportValue == "1")
            {
                IsExport = true;
            }

            #region 获取团队数URL
            EyouSoft.BLL.CompanyStructure.CompanySetting        setBll   = new EyouSoft.BLL.CompanyStructure.CompanySetting();
            EyouSoft.Model.CompanyStructure.CompanyFieldSetting setModel = setBll.GetSetting(SiteUserInfo.CompanyID);
            URL = setModel.ProfitStatTourPagePath;
            #endregion

            #region 初始化数据
            if (!IsPostBack)
            {
                InitProTimeStaticlist();
            }
            #endregion

            #region 导出
            if ((list != null && list.Count != 0) && IsExport)
            {
                ToExcel(this.crp_PrintProTimeStaList, list);
            }
            #endregion
        }
Example #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tsModel = new LineInquireQuoteInfo();

            EyouSoft.BLL.TourStructure.LineInquireQuoteInfo tsBLL = new EyouSoft.BLL.TourStructure.LineInquireQuoteInfo();

            if (!IsPostBack)
            {
                loedUser();
                type = Utils.GetQueryStringValue("type");//操作
                tid  = Utils.GetInt(Utils.GetQueryStringValue("tid"));
                switch (type)
                {
                case "Update":

                    bind();
                    txtLDate.Text      = tsModel.LeaveDate.Value.ToString("yyyy-MM-dd");
                    xianluWindow1.Name = tsModel.RouteName;
                    xianluWindow1.Id   = tsModel.RouteId.ToString();
                    if (tsModel.SpecialClaim != "")
                    {
                        txt_xinchen.Text = tsModel.XingCheng.QuotePlan;
                    }
                    break;
                }
                #region 配置
                EyouSoft.BLL.CompanyStructure.CompanySetting        setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //初始化bll
                EyouSoft.Model.CompanyStructure.CompanyFieldSetting set    = setBll.GetSetting(SiteUserInfo.CompanyID);          //配置实体
                hd_IsRequiredTraveller.Value = set.IsRequiredTraveller.ToString();
                #endregion
            }
            //else
            //{
            //    Save();//保存或修改操作
            //}
        }
Example #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //计划类型: 快速 or 标准
                string planType = Utils.GetQueryStringValue("planType");
                //操作类型 : 散拼 or 团队
                string type = Utils.GetQueryStringValue("type");
                //修改记录的ID
                string id = Utils.GetQueryStringValue("id");
                //计划ID
                string planId = Utils.GetQueryStringValue("planId");
                //地接ID
                string travelId = Utils.GetQueryStringValue("travelId");
                //分页
                pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
                //操作类型
                string doType = Utils.GetQueryStringValue("doType");
                switch (doType)
                {
                case "Update":
                    this.hideDoType.Value = "Update";
                    break;

                case "View":
                    this.hideDoType.Value = "View";
                    break;

                default:
                    this.hideDoType.Value = "Add";
                    break;
                }
                if (id != "")
                {
                    this.hideId.Value = id;
                }
                if (planId != "")
                {
                    this.hidePlanId.Value = planId;
                }
                if (travelId != "")
                {
                    this.hideDiJieID.Value = travelId;
                }
                if (planType == "Normal")
                {
                    //标准版发布
                    this.hidePlanType.Value = "Normal";
                }
                else
                {
                    //快速版发布
                    this.hidePlanType.Value = "Quick";
                    //快速发布 没有 接待行程 功能
                    this.pnlJieDai.Visible = false;
                }

                if (type == "team")
                {
                    //团队计划权限判断
                    if (CheckGrant(TravelPermission.团队计划_团队计划_栏目))
                    {
                        if (CheckGrant(TravelPermission.团队计划_团队计划_安排地接))
                        {
                            this.Page.Title = "团队计划_安排地接";
                        }
                        else
                        {
                            Utils.ResponseNoPermit(TravelPermission.团队计划_团队计划_安排地接, false);
                        }
                    }
                    else
                    {
                        Utils.ResponseNoPermit(TravelPermission.团队计划_团队计划_栏目, false);
                    }
                }
                else
                {
                    //散拼计划权限判断
                    if (CheckGrant(TravelPermission.散拼计划_散拼计划_栏目))
                    {
                        if (CheckGrant(TravelPermission.散拼计划_散拼计划_安排地接))
                        {
                            this.Page.Title = "散拼计划_安排地接";
                        }
                        else
                        {
                            Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_安排地接, false);
                        }
                    }
                    else
                    {
                        Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_栏目, false);
                    }
                }

                //获得当前A类 or B类
                EyouSoft.BLL.CompanyStructure.CompanySetting setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting();//初始化bll

                EyouSoft.Model.CompanyStructure.CompanyFieldSetting set = setBll.GetSetting(SiteUserInfo.CompanyID);
                if (set != null)
                {
                    if (set.PriceComponent == EyouSoft.Model.EnumType.CompanyStructure.PriceComponent.分项报价)
                    {
                        isA = true;
                        hideTypeAorB.Value       = "B";
                        this.pnlProjectA.Visible = false;
                        this.pnlProjectB.Visible = true;
                    }
                    else
                    {
                        isA = false;
                        hideTypeAorB.Value       = "A";
                        this.pnlProjectA.Visible = true;
                        this.pnlProjectB.Visible = false;
                    }
                }
                // 初始化
                DataListInit(planId);
                //下拉框初始化
                DdlProjectListInit();
                if (id != "" && planType != "")
                {
                    DataModelInti(id, planType);
                }
            }
        }
Example #11
0
        protected string companyLog = string.Empty; //公司log
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断权限
            if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_系统配置_系统设置栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_系统配置_系统设置栏目, true);
                return;
            }
            string method = Utils.GetFormValue("hidMethod");

            EyouSoft.BLL.CompanyStructure.CompanySetting        setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //初始化bll
            EyouSoft.Model.CompanyStructure.CompanyFieldSetting set    = null;                                               //配置实体
            if (method == "save")
            {
                //保存
                set = new EyouSoft.Model.CompanyStructure.CompanyFieldSetting();
                string fileName1 = string.Empty;

                string         oldName = string.Empty;
                bool           result  = true;
                HttpPostedFile fLog    = Request.Files["fileLog"];
                HttpPostedFile fHeader = Request.Files["fileHeader"];
                HttpPostedFile fFooter = Request.Files["fileFooter"];
                HttpPostedFile fSeal   = Request.Files["fileSeal"];
                HttpPostedFile fModel  = Request.Files["fileModel"];
                if (fLog != null && !string.IsNullOrEmpty(fLog.FileName))
                {
                    result          = UploadFile.FileUpLoad(fLog, "systemset", out fileName1, out oldName);//上传logo
                    set.CompanyLogo = fileName1;
                }
                else
                {
                    set.CompanyLogo = hidLog.Value;
                }
                set.CompanyPrintFile = new EyouSoft.Model.CompanyStructure.CompanyPrintTemplate();

                if (fHeader != null && !string.IsNullOrEmpty(fHeader.FileName))
                {
                    result = UploadFile.FileUpLoad(fHeader, "systemset", out fileName1, out oldName);//上传页眉
                    set.CompanyPrintFile.PageHeadFile = fileName1;
                }
                else
                {
                    set.CompanyPrintFile.PageHeadFile = hidHeader.Value;
                }
                if (result && (fFooter != null && !string.IsNullOrEmpty(fFooter.FileName)))
                {
                    result = UploadFile.FileUpLoad(fFooter, "systemset", out fileName1, out oldName);//上传页脚
                    set.CompanyPrintFile.PageFootFile = fileName1;
                }
                else
                {
                    set.CompanyPrintFile.PageFootFile = hidFooter.Value;
                }
                if (result && (fModel != null && !string.IsNullOrEmpty(fModel.FileName)))
                {
                    result = UploadFile.FileUpLoad(fModel, "systemset", out fileName1, out oldName);//上传模板
                    set.CompanyPrintFile.TemplateFile = fileName1;
                }
                else
                {
                    set.CompanyPrintFile.TemplateFile = hidModel.Value;
                }
                if (result && (fSeal != null && !string.IsNullOrEmpty(fSeal.FileName)))
                {
                    result = UploadFile.FileUpLoad(fSeal, "systemset", out fileName1, out oldName);//上传公章
                    set.CompanyPrintFile.DepartStamp = fileName1;
                }
                else
                {
                    set.CompanyPrintFile.DepartStamp = hidSeat.Value;
                }
                if (result)
                {
                    //留位时间
                    set.ReservationTime = Utils.GetInt(txtRetainHour.Value) * 60;
                    //价格组成
                    set.PriceComponent          = rdiPrice.SelectedValue == "1" ? EyouSoft.Model.EnumType.CompanyStructure.PriceComponent.分项报价 : EyouSoft.Model.EnumType.CompanyStructure.PriceComponent.统一报价;
                    set.DisplayAfterMonth       = Utils.GetInt(txtAfterMonth.Value);                                                                        //列表显示控制后几月
                    set.DisplayBeforeMonth      = Utils.GetInt(txtBeforeMonth.Value);                                                                       //列表显示控制前几月
                    set.SongTuanRenId           = GroupSender.OperId;                                                                                       //送团人编号
                    set.SongTuanRenName         = GroupSender.OperName;                                                                                     //送团人姓名
                    set.JiHeDiDian              = GroupSet.Value;                                                                                           //集合地点
                    set.JiHeBiaoZhi             = SetMark.Value;                                                                                            //集合标志
                    set.CompanyId               = CurrentUserCompanyID;
                    set.ReceiptRemindType       = (EyouSoft.Model.EnumType.CompanyStructure.ReceiptRemindType)(int.Parse(rbl_ReceiptRemind.SelectedValue)); //收款提醒
                    set.TanChuangTiXingInterval = Utils.GetInt(Utils.GetFormValue(txtTanChuangTiXingInterval.UniqueID), 1) * 60;
                    result = setBll.SetCompanySetting(set);
                }
                if (set != null && set.CompanyPrintFile != null)
                {
                    SetPrintPic(set);//更新模板显示
                }
                MessageBox.ShowAndRedirect(this, result ? "设置成功!" : "设置失败!", "/systemset/ConfigSet.aspx");
                return;
            }
            set = setBll.GetSetting(CurrentUserCompanyID);//获得配置信息
            if (set != null)
            {
                //初始化配置信息
                txtRetainHour.Value              = (set.ReservationTime / 60.0).ToString("F1"); //最长留位小时
                txtRetainMin.Value               = set.ReservationTime.ToString();              //最长留位分钟
                rdiPrice.SelectedValue           = ((int)set.PriceComponent).ToString();        //价格组成
                txtBeforeMonth.Value             = set.DisplayBeforeMonth.ToString();           //列表显示控制前几月
                txtAfterMonth.Value              = set.DisplayAfterMonth.ToString();            //列表显示控制后几月
                GroupSender.OperId               = set.SongTuanRenId;
                GroupSender.OperName             = set.SongTuanRenName;
                GroupSet.Value                   = set.JiHeDiDian;
                SetMark.Value                    = set.JiHeBiaoZhi;
                rbl_ReceiptRemind.SelectedValue  = ((int)set.ReceiptRemindType).ToString();//收款提醒
                txtTanChuangTiXingInterval.Value = (set.TanChuangTiXingInterval / 60).ToString();
            }
            if (set != null && set.CompanyPrintFile != null)
            {
                SetPrintPic(set);//显示模板
            }
        }
Example #12
0
        protected bool IsChecked1; //团队状态是4

        #region 页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            #region  拉框添加点击事件
            ddlSupperlierList.Attributes.Add("onchange", "ChecklocaCustomer(this)");
            #endregion

            #region 修改权限验证
            if (!CheckGrant(TravelPermission.单项服务_单项服务_修改服务))
            {
                Utils.ResponseNoPermit(TravelPermission.单项服务_单项服务_修改服务, true);
                return;
            }
            #endregion

            #region 配置
            EyouSoft.BLL.CompanyStructure.CompanySetting        setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //初始化bll
            EyouSoft.Model.CompanyStructure.CompanyFieldSetting set    = setBll.GetSetting(CurrentUserCompanyID);            //配置实体
            hd_IsRequiredTraveller.Value = set.IsRequiredTraveller.ToString();                                               //游客是否允许为空配置
            #endregion
            // 绑定项目类型
            BindPriceItem();
            if (Request.QueryString["EditId"] != null)//修改ID
            {
                EditId = Request.QueryString["EditId"];
            }

            #region 新增权限验证
            if (!CheckGrant(TravelPermission.单项服务_单项服务_新增服务))
            {
                Utils.ResponseNoPermit(TravelPermission.单项服务_单项服务_新增服务, true);
                return;
            }
            #endregion
            EyouSoft.BLL.TourStructure.TourOrder tourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(this.SiteUserInfo);

            this.txtOrderNo.Value = tourOrderBll.CreateOrderNo();


            if (!Page.IsPostBack)
            {
                #region 栏目权限验证
                if (!CheckGrant(TravelPermission.单项服务_单项服务_栏目))
                {
                    Utils.ResponseNoPermit(TravelPermission.单项服务_单项服务_栏目, true);
                    return;
                }
                #endregion

                LoadVisitors1.CurrentPageIframeId = Request.QueryString["iframeId"];

                if (EditId != "")
                {
                    EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo);
                    EditModel = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(EditId);
                    if (EditModel == null)
                    {
                        Utils.ShowAndRedirect("未能找到您要修改的记录!", "/SingleServe/SingleServeList.aspx");
                    }
                    IsUpdate   = true;                                                                //确认修改操作
                    IsChecked  = ((int)EditModel.Status) == 5;                                        //判断团队状态是否核算结束
                    IsChecked1 = ((int)EditModel.Status) == 4;                                        //判断团队状态是否是财务核算
                    #region 初始化表单值
                    txtContactName.Value      = EditModel.ContacterName;                              //联系人
                    txtCustomerCompany.Value  = EditModel.BuyerCName;                                 //客户单位名称
                    this.TxtStartTime.Value   = EditModel.LDate.ToString("yyyy-MM-dd");               //委托出团日期
                    this.txtTourCode.Value    = EditModel.TourCode;                                   //团号
                    this.hideOldTeamNum.Value = EditModel.TourCode;                                   //团号
                    hfSelectCustId.Value      = EditModel.BuyerCId.ToString();                        //客户单位编号
                    selectOperator1.OperId    = EditModel.SellerId.ToString();                        //销售员编号
                    selectOperator1.OperName  = EditModel.SellerName;                                 //销售员名称
                    txtOrderNo.Value          = EditModel.OrderCode;                                  //订单号
                    txtPersonNum.Value        = EditModel.PlanPeopleNumber.ToString();
                    txtTel.Value         = EditModel.ContacterTelephone;                              //电话
                    txtTotalIncome.Value = Utils.FilterEndOfTheZeroDecimal(EditModel.TotalAmount);    //合计收入
                    txtTotalOutlay.Value = Utils.FilterEndOfTheZeroDecimal(EditModel.TotalOutAmount); //合计支出
                    txtGrossProfit.Value = Utils.FilterEndOfTheZeroDecimal(EditModel.GrossProfit);    //毛利
                    hfOBuyerId.Value     = EditModel.BuyerCId.ToString();
                    #region 绑定游客信息
                    if (EditModel.Customers != null && EditModel.Customers.Count > 0)
                    {
                        StringBuilder VisitorBuilder = new StringBuilder();
                        VisitorBuilder.Append("[");
                        foreach (var item in EditModel.Customers)
                        {
                            VisitorBuilder.Append("[");
                            VisitorBuilder.AppendFormat("'{0}','{1}','{2}','{3}','{4}','{5}','{6}'",
                                                        item.VisitorName, (int)item.VisitorType, (int)item.CradType, item.CradNumber,
                                                        (int)item.Sex, item.ContactTel, FormatSpecialServe(item.SpecialServiceInfo), item.ID);
                            VisitorBuilder.Append("],");
                        }
                        VisitorBuilder.Append("]");
                        VisitorArr = VisitorBuilder.ToString().Substring(0, VisitorBuilder.Length - 2) + "]";
                    }
                    else
                    {
                        VisitorArr = "[]";
                    }
                    #endregion

                    #region 客户要求
                    if (EditModel.Services != null && EditModel.Services.Count > 0)
                    {
                        GuestRequestJSON = Newtonsoft.Json.JsonConvert.SerializeObject(EditModel.Services);
                    }
                    else
                    {
                        GuestRequestJSON = "{}";
                    }
                    #endregion

                    #region 供应商安排
                    if (EditModel.Plans != null && EditModel.Plans.Count > 0)
                    {
                        SupplierJSON = Newtonsoft.Json.JsonConvert.SerializeObject(EditModel.Plans);
                    }
                    #endregion

                    #region 附件信息
                    if (!string.IsNullOrEmpty(EditModel.CustomerFilePath))
                    {
                        aFile.HRef      = EditModel.CustomerFilePath;
                        aFile.Target    = "_blank";
                        hFileInfo.Value = EditModel.CustomerFilePath;
                    }
                    #endregion

                    #endregion
                }
            }

            string type = Utils.GetQueryStringValue("type");
            if (type == "getInfo")
            {
                int cid = Utils.GetInt(Utils.GetQueryStringValue("cid"));
                EyouSoft.BLL.CompanyStructure.Customer       custBll = new EyouSoft.BLL.CompanyStructure.Customer();
                EyouSoft.Model.CompanyStructure.CustomerInfo model   = custBll.GetCustomerModel(cid);
                Response.Clear();
                if (model != null)
                {
                    Response.Write(model.ContactName + "|" + model.Phone);
                }
                else
                {
                    Response.Write(" | ");
                }
                Response.End();
            }
        }
Example #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                #region 地接社列表
                //计划编号
                string tourid = Utils.GetQueryStringValue("Tourid");
                DataListInit(tourid);
                #endregion

                if (Utils.GetQueryStringValue("action") == "first")
                {
                    DataListInitfirst(tourid);
                }

                //计划类型: 快速 or 标准
                string planType = Utils.GetQueryStringValue("planType");
                //修改记录的ID
                string id = Utils.GetQueryStringValue("id");
                //地接ID
                string travelId = Utils.GetQueryStringValue("travelId");
                //分页
                pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
                if (id != "")
                {
                    this.hideId.Value = id;
                }
                //团号
                if (tourid != "")
                {
                    this.hidePlanId.Value = tourid;
                }
                //地接编号
                if (travelId != "")
                {
                    this.hideDiJieID.Value = travelId;
                }
                //发布类型
                if (planType == "Normal")
                {
                    //标准版发布
                    this.hidePlanType.Value = "Normal";
                }
                else
                {
                    //快速版发布
                    this.hidePlanType.Value = "Quick";
                    //快速发布 没有 接待行程 功能
                    this.pnlJieDai.Visible = false;
                }
                //获得当前地接价格组成A类 or B类
                EyouSoft.BLL.CompanyStructure.CompanySetting        setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting();//初始化bll
                EyouSoft.Model.CompanyStructure.CompanyFieldSetting set    = setBll.GetSetting(SiteUserInfo.LocalAgencyCompanyInfo.CompanyId);
                if (set != null)
                {
                    if (set.PriceComponent == EyouSoft.Model.EnumType.CompanyStructure.PriceComponent.分项报价)
                    {
                        this.pnlProjectA.Visible = false;
                        this.pnlProjectB.Visible = true;
                    }
                    else
                    {
                        this.pnlProjectA.Visible = true;
                        this.pnlProjectB.Visible = false;
                    }
                }
                #region 初始化地接社
                if (id != "" && planType != "")
                {
                    //再次绑定地接社
                    string planid = Utils.GetQueryStringValue("planId");
                    this.hidePlanId.Value   = planid;
                    this.hidePlanType.Value = planType;
                    DataListInit(planid);
                    //getmodel取地接社详细信息
                    DataModelInti(id, planType);
                }
                #endregion
            }
        }