Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int userId = BLL.Util.GetLoginUserID();

            if (!BLL.Util.CheckRight(userId, "SYS024MOD510204") && !BLL.Util.CheckRight(userId, "SYS024MOD510205") && !BLL.Util.CheckRight(userId, "SYS024MOD5101"))
            {
                Response.Write(BLL.Util.GetNotAccessMsgPage("您没有访问该页面的权限"));
                Response.End();
            }
            ALLNotEstablishReasonStr = CallResult_ORIG_Task.GetNotEstablishReasonStr();
            ALLNotSuccessReasonStr   = CallResult_ORIG_Task.GetNotSuccessReasonStr();

            if (!IsPostBack && TTCode != "")
            {
                Entities.QueryTPage query = new Entities.QueryTPage();
                query.TTCode = TTCode;

                int       totalCount = 0;
                DataTable dt         = BLL.TPage.Instance.GetTPage(query, "", 1, 999, out totalCount);

                if (dt != null && dt.Rows.Count > 0)
                {
                    TPageName          = dt.Rows[0]["TPName"].ToString();
                    BGID               = dt.Rows[0]["BGID"].ToString();
                    CID                = dt.Rows[0]["SCID"].ToString();
                    Desc               = dt.Rows[0]["TPContent"].ToString();
                    IsShowBtn          = dt.Rows[0]["IsShowBtn"].ToString();
                    IsShowWorkOrderBtn = dt.Rows[0]["IsShowWorkOrderBtn"].ToString();
                    IsShowSendMsgBtn   = dt.Rows[0]["IsShowSendMsgBtn"].ToString();
                    IsShowQiCheTong    = dt.Rows[0]["IsShowQiCheTong"].ToString();
                    IsShowSubmitOrder  = dt.Rows[0]["IsShowSubmitOrder"].ToString();

                    templateStatus = BLL.TPage.Instance.getStatus(dt.Rows[0]["RecID"].ToString(), dt.Rows[0]["Status"].ToString()).ToString();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            DemandDetailsUrl += "&OrderCode={0}";
            if (!IsPostBack)
            {
                ALLNotEstablishReasonStr = CallResult_ORIG_Task.GetNotEstablishReasonStr();
                BlackWhiteList           = Convert.ToInt16(Entities.NotEstablishReason.N05_免打扰屏蔽).ToString();
                List <int> filterList = new List <int>()
                {
                    24, 1, 10, 16, 12, 13, 11, 14, 6, 8, 9, 17, 25, 26, 27, 28, 23
                };
                ALLNotSuccessReasonStr = CallResult_ORIG_Task.GetNotSuccessReasonStr(filterList);
                userid = BLL.Util.GetLoginUserID();
                model  = BLL.LeadsTask.Instance.GetLeadsTask(TaskID);

                if (model == null)
                {
                    #region 任务不存在
                    Response.Write(@"<script language='javascript'>alert('该任务不存在,页面将被关闭。');try {
                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                       }
                                                       catch (e) {
                                                           window.opener = null; window.open('', '_self'); window.close();
                                                       }</script>");
                    #endregion
                }
                else
                {
                    this.Remark.Value = model.Remark.ToString();
                    if (model.AssignUserID != BLL.Util.GetLoginUserID())
                    {
                        #region 当前人不是处理人
                        Response.Write(@"<script language='javascript'>alert('您不是该任务的当前处理人,页面将被关闭。');try {
                                                                               window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                                           }
                                                                           catch (e) {
                                                                               window.opener = null; window.open('', '_self'); window.close();
                                                                           }</script>");
                        #endregion
                    }
                    //判断是否是处理状态
                    else if (model.Status != (int)Entities.LeadsTaskStatus.Processing && model.Status != (int)Entities.LeadsTaskStatus.NoProcess)
                    {
                        #region 任务不在处理状态
                        Response.Write(@"<script language='javascript'>alert('该任务不处于处理状态,页面将被关闭。');try {
                                                                               window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                                           }
                                                                           catch (e) {
                                                                               window.opener = null; window.open('', '_self'); window.close();
                                                                           }</script>");
                        #endregion
                    }
                    else
                    {
                        //项目名称
                        Entities.ProjectInfo ProjectInfoModel = BLL.ProjectInfo.Instance.GetProjectInfo(model.ProjectID);
                        ProjectName = ProjectInfoModel.Name;

                        //性别
                        int Sex = -2;
                        Sex = (int)model.Sex;
                        if (Sex == 1)
                        {
                            this.rdoMan.Checked = true;
                        }
                        else if (Sex == 2)
                        {
                            this.rdoWomen.Checked = true;
                        }
                        //下单地区
                        ProvinceName = BitAuto.YanFa.Crm2009.BLL.AreaInfo.Instance.GetAreaName(model.ProvinceID.ToString());
                        CityName     = BitAuto.YanFa.Crm2009.BLL.AreaInfo.Instance.GetAreaName(model.CityID.ToString());

                        //加载客户名称,需匹配车型列表
                        GetDemandIDInfo(model.DemandID);
                        //绑定失败原因
                        BindFailReason();
                        //绑定预计购车时间
                        BindPlanBuyCarTime();
                        //根据Leads处理实体加载地区,下单车型,需匹配车型信息
                        LoadLeadInfo(model);

                        //绑定月份
                        BindLatelyThreeYear();

                        intIsBoughtCar = model.IsBoughtCar.HasValue ? model.IsBoughtCar.Value : -1;

                        intBoughtCarMasterID = model.BoughtCarMasterID.HasValue ? model.BoughtCarMasterID.Value : -1;
                        strBoughtCarMaster   = model.BoughtCarMaster;
                        intBoughtCarSerialID = model.BoughtCarSerialID.HasValue ? model.BoughtCarSerialID.Value : -1;
                        strBoughtCarSerial   = model.BoughtCarSerial;
                        if (!string.IsNullOrEmpty(model.BoughtCarYearMonth))
                        {
                            string[] strYM = model.BoughtCarYearMonth.Split(',');
                            if (strYM.Length == 2)
                            {
                                strBoughtCarYear  = strYM[0];
                                strBoughtCarMonth = strYM[1];
                            }
                        }
                        strBoughtCarDealerID   = model.BoughtCarDealerID;
                        strBoughtCarDealerName = model.BoughtCarDealerName;
                        //未购车
                        intHasBuyCarPlan        = model.HasBuyCarPlan.HasValue ? model.HasBuyCarPlan.Value : -1;
                        intIsAttention          = model.IsAttention.HasValue ? model.IsAttention.Value : -1;
                        intIsContactedDealer    = model.IsContactedDealer.HasValue ? model.IsContactedDealer.Value : -1;
                        intIsSatisfiedService   = model.IsSatisfiedService.HasValue ? model.IsSatisfiedService.Value : -1;
                        strContactedWhichDealer = model.ContactedWhichDealer;

                        intIntentionCarMasterID = model.IntentionCarMasterID.HasValue ? model.IntentionCarMasterID.Value : -1;
                        strIntentionCarMaster   = model.IntentionCarMaster;
                        intIntentionCarSerialID = model.IntentionCarSerialID.HasValue ? model.IntentionCarSerialID.Value : -1;
                        strIntentionCarSerial   = model.IntentionCarSerial;
                    }
                }
            }
        }