Beispiel #1
0
        protected override void DataToFace(Contract model)
        {
            if (model == null)
            {
                return;
            }
            this.ContractNameID.Text = model.ContractName;
            AspNetHelper.SetDropDownSelectedvalue(StateId, model.State);
            if (model.Customer != null)
            {
                this.CustomerID.SelectedValue = model.Customer.Id.ToString();
            }
            this.CodeID.Text      = model.ContractName;
            this.StartDateID.Text = model.StartDate.ToShortDateString();
            this.EndDateID.Text   = model.EndDate.ToShortDateString();

            if (model.SignPerson != null)
            {
                SignPersonID.SelectedValue = model.SignPerson.Id.ToString();
            }
            this.CustomerSignPersonID.Text = model.CustomerSignPerson;
            this.SignDateID.Text           = model.SignDate.ToShortDateString();

            this.SignAddressID.Text = model.SignAddress;
            this.StorePlaceID.Text  = model.StorePlace;
            this.SumID.Text         = model.Sum.ToString();

            this.SettleStateID.SelectedValue = ((int)model.SettleState).ToString();
            this.RemarkID.Text  = model.Remark;
            this.ContentID.Text = model.Content;
            CustomerNameID.Text = model.CustomerName;


            files.InnerHtml = AspNetHelper.DownLoadFile(model.FiledIds);
        }
Beispiel #2
0
        protected override void DataToFace(Suggest model)
        {
            if (model == null)
            {
                return;
            }

            this.CustomerID.Text    = model.CustoMerName;
            this.SuggestDateID.Text = model.SuggestDate.ToShortDateString();
            this.SolveDateID.Text   = model.SolveDate.ToShortDateString();

            if (model.Customer != null)
            {
                this.CustomerID.SelectedValue = model.Customer.Id.ToString();
            }
            this.CustomerNameID.Text = model.CustoMerName;

            this.ContentID.Text      = model.Content;
            this.SolveResultsID.Text = model.SolveResults;
            AspNetHelper.SetDropDownSelectedvalue(this.SuggestTypeID, model.SuggestType);
            AspNetHelper.SetDropDownSelectedvalue(this.SolveTypeID, model.SolveType);
            if (model.HandlerPerson != null)
            {
                HandlerPersonID.SelectedValue = model.HandlerPerson.Id.ToString();
            }
            if (model.DealPerson != null)
            {
                DealPersonID.SelectedValue = model.DealPerson.Id.ToString();
            }
            files.InnerHtml = AspNetHelper.DownLoadFile(model.Files);
        }
Beispiel #3
0
        private void BindDropDownList()
        {
            if (this.IsPay)
            {
                AspNetHelper.BindCooperation(this.CustomerID);
            }
            else
            {
                AspNetHelper.BindCustomer(this.CustomerID);
            }
            this.StateId.Items.Clear();
            this.StateId.Items.AddRange(new ListItem[]
            {
                new ListItem()
                {
                    Text = "是", Value = "1"
                },
                new ListItem()
                {
                    Text = "否", Value = "0", Selected = true
                }
            });

            AspNetHelper.BindBussinessPerson(this.ChargePersonID);

            if (this.IsPay)
            {
                Dictionary <DropDownList, string> request = new Dictionary <DropDownList, string>();
                request[FinancialPayTypeID] = "FinancialPayType";
                AspNetHelper.BindDropDown(request);
            }
        }
Beispiel #4
0
        private void BindDropdown()
        {
            var dic = new Dictionary <DropDownList, string>();

            dic[this.CardTypeID] = "VipCategory";
            AspNetHelper.BindDropDown(dic);
        }
Beispiel #5
0
        protected override void FaceToData(ref Task model)
        {
            model.ModifyTime = DateTime.Now;

            if (!this.IsEdit)
            {
                model.CreateUser = this.CurrentOperatorUser;
            }

            model.Subject     = this.SubjectID.Text;
            model.TaskContent = this.TaskContentID.Text;
            var userService = WebCrm.Framework.DependencyResolver.Resolver <IUserInfoService>();

            if (this.AssignUserID.SelectedValue.IsInt())
            {
                model.AssignUser = userService.FindById(int.Parse(this.AssignUserID.SelectedValue));
            }

            if (this.ActualDateID.Text.IsDateTime())
            {
                model.ActualDate = DateTime.Parse(this.ActualDateID.Text);
            }
            if (this.StartDateID.Text.IsDateTime())
            {
                model.StartDate = DateTime.Parse(this.StartDateID.Text);
            }
            if (this.ExpectationDateID.Text.IsDateTime())
            {
                model.ExpectationDate = DateTime.Parse(ExpectationDateID.Text);
            }

            model.ExecutionContent = this.ExecutionContentID.Text;
            model.TaskProcess      = AspNetHelper.GetItemByDropDownValue(this.TaskProcessID);
            model.Remark           = this.RemarkID.Text;
        }
Beispiel #6
0
        protected override void FaceToData(ref CustomerAgreement model)
        {
            model.ModifyTime = DateTime.Now;

            if (!this.IsEdit)
            {
                model.CreateUser = this.CurrentOperatorUser;
            }

            model.Subject = this.SubjectID.Text;
            model.Content = this.ContentID.Text;
            var userService = WebCrm.Framework.DependencyResolver.Resolver <ICustomerService>();

            if (this.CustomerID.SelectedValue.IsInt())
            {
                model.Customer = userService.FindById(int.Parse(this.CustomerID.SelectedValue));
            }

            if (this.ExpireID.Text.IsDateTime())
            {
                model.Expire = DateTime.Parse(this.ExpireID.Text);
            }

            model.AgreementType = AspNetHelper.GetItemByDropDownValue(this.AgreementTypeID);
            model.Remark        = this.RemarkID.Text;
            model.FileIds       = model.FileIds + "," + Request.GetRequestValue("fileID").Trim(',');
        }
Beispiel #7
0
        protected override void DataToFace(Task model)
        {
            if (model == null)
            {
                return;
            }
            this.SubjectID.Text     = model.Subject;
            this.TaskContentID.Text = model.TaskContent;
            if (model.AssignUser != null)
            {
                this.AssignUserID.SelectedValue = model.AssignUser.Id.ToString();
            }
            this.ActualDateID.Text = model.ActualDate.HasValue
                                         ? model.ActualDate.Value.ToString("yyyy-MM-dd")
                                         : string.Empty;

            this.StartDateID.Text       = model.StartDate.ToString("yyyy-MM-dd");
            this.ExpectationDateID.Text = model.ExpectationDate.HasValue
                                              ? model.ExpectationDate.Value.ToString("yyyy-MM-dd")
                                              : string.Empty;

            this.ExecutionContentID.Text = model.ExecutionContent;

            AspNetHelper.SetDropDownSelectedvalue(this.TaskProcessID, model.TaskProcess);

            this.RemarkID.Text = model.Remark;
        }
Beispiel #8
0
        /// <summary>
        /// 绑定省份下拉列表
        /// </summary>
        protected void BindDDLProvince()
        {
            Dictionary <DropDownList, string> requestList = new Dictionary <DropDownList, string>();

            requestList[ddlProvince] = "CustomerArea"; // 区域
            AspNetHelper.BindDropDown(requestList);
            ddlProvince.Items[0].Text = "全部";
        }
        /// <summary>
        /// 绑定省份下拉列表
        /// </summary>
        protected void BindDDLProvince()
        {
            Dictionary <DropDownList, string> requestList = new Dictionary <DropDownList, string>();

            requestList[CustomerCategoryID] = "CustomerType"; // 客户类型
            AspNetHelper.BindDropDown(requestList);
            CustomerCategoryID.Items[0].Text = "全部";
        }
Beispiel #10
0
        private void BindDropDown()
        {
            var requestList = new Dictionary <DropDownList, string>();

            requestList[this.CustomerSourceID]   = "CustomerSource";   // 客户来源
            requestList[this.CustomerBusinessID] = "CustomerBusiness"; // 客户行业
            AspNetHelper.BindDropDown(requestList);
        }
Beispiel #11
0
        private void BindDropDownList()
        {
            AspNetHelper.BindBussinessPerson(this.AssignUserID);
            var request = new Dictionary <DropDownList, string>();

            request[this.TaskProcessID] = "TaskProcess";
            AspNetHelper.BindDropDown(request);
        }
Beispiel #12
0
        private void BindExplodedPointList()
        {
            ExplodedPointList.Items.Clear();
            Dictionary <DropDownList, string> dictionary = new Dictionary <DropDownList, string>();

            dictionary[this.ExplodedPointList] = "ConsumerBusinessType";
            AspNetHelper.BindDropDown(dictionary);
        }
Beispiel #13
0
        /// <summary>
        /// 用户列表
        /// </summary>
        public void BindUserTreeData()
        {
            TreeNode root = new TreeNode();

            root.Text  = "用户列表";
            root.Value = "0";
            root.ChildNodes.AddReage(AspNetHelper.GetOperateTree(this.CurrentOperatorUser, this.RolePlugService.GetUsers(this.CurrentRole)));
            tvUser.Nodes.Add(root);
        }
Beispiel #14
0
 // Token: 0x06000051 RID: 81 RVA: 0x00003435 File Offset: 0x00001635
 protected override void OnInit(EventArgs e)
 {
     if (this.setNoCacheNoStore)
     {
         AspNetHelper.MakePageNoCacheNoStore(base.Response);
     }
     this.EnableViewState = false;
     base.OnInit(e);
 }
Beispiel #15
0
        private void BindDropDownList()
        {
            var request = new Dictionary <DropDownList, string>();

            request[this.AgreementTypeID] = "AgreementType";
            AspNetHelper.BindDropDown(request);

            AspNetHelper.BindCustomer(this.CustomerID);
        }
Beispiel #16
0
        private void BindDropDown()
        {
            var dic = new Dictionary <DropDownList, string>();

            dic[this.StateID]    = "CompanyAction_State";
            dic[this.EvaluateID] = "CompanyAction_Evaluate";

            AspNetHelper.BindDropDown(dic);
        }
Beispiel #17
0
        private void BindDropList()
        {
            var dic = new Dictionary <DropDownList, string>();

            dic.Add(this.State, "CustomerDiscussState");
            AspNetHelper.BindDropDown(dic);
            AspNetHelper.BindCustomer(this.CustomerID);
            AspNetHelper.BindBussinessPerson(this.BusinessPeopleID);
        }
Beispiel #18
0
        private void BindDropDown()
        {
            var dic = new Dictionary <DropDownList, string>();

            dic[this.ChannelID]  = "Advertising_Channel";
            dic[this.StateID]    = "Advertising_State";
            dic[this.EvaluateID] = "Advertising_Evaluate";

            AspNetHelper.BindDropDown(dic);
        }
Beispiel #19
0
 protected override void DataToFace(Template model)
 {
     if (model == null)
     {
         return;
     }
     this.TemplateNameID.Text = model.TemplateName;
     this.TemplateCodeID.Text = model.TemplateCode;
     this.MsgContentID.Text   = model.MsgContent;
     AspNetHelper.SetDropDownSelectedvalue(this.MsgTypeID, model.MsgType);
 }
Beispiel #20
0
        private void BindDropList()
        {
            var dic = new Dictionary <DropDownList, string>();

            dic[this.DiscountType]    = "Customer_DiscountType"; // 打折方式
            dic[ScoreRuleID]          = "Customer_ScoreRule";    // 积分规则
            dic[ConsumerBusinessType] = "ConsumerBusinessType";  // 消费类型
            AspNetHelper.BindDropDown(dic);
            AspNetHelper.BindBussinessPerson(BussinessPersonID);
            AspNetHelper.BindCustomer(this.CustomerID);
        }
Beispiel #21
0
        /// <summary>
        /// 根据条件查询,返回查询后的Tree
        /// </summary>
        /// <param name="keyWord">关键词,为空表示查询整棵树</param>
        /// <returns></returns>
        public List <TreeNode> GetMenuTree(string keyWord)
        {
            var pageQuery = new PageQuery <IDictionary <string, object>, Plug>(this.CurrentOperatorUser);

            pageQuery.Condition = new Dictionary <string, object>();

            pageQuery.SetQueryAll();
            PlugService.Query(pageQuery);
            return(AspNetHelper.GetPlugChildNote(pageQuery.Result.ToList(),
                                                 this.RolePlugService.GetPlugs(this.CurrentRole).ToList()));
        }
Beispiel #22
0
        protected override void DataToFace(CustormerConsumRecord value)
        {
            if (value == null)
            {
                WritePersonID.Text    = this.CurrentOperatorUser.OperatorName;
                this.VisitDateID.Text = DateTime.Now.ToShortDateString();
                ScoreID.Text          = "0";
                return;
            }
            if (value.Customer != null)
            {
                this.CustomerID.SelectedValue = value.Customer.Id.ToString();
            }
            if (value.ConsumptionDate.HasValue)
            {
                this.VisitDateID.Text = value.ConsumptionDate.Value.ToShortDateString();
            }
            if (value.ScoreRule != null)
            {
                this.ScoreRuleID.SelectedValue = value.ScoreRule.Id.ToString();
            }
            if (value.ConsumptionDate.HasValue)
            {
                this.VisitDateID.Text = value.ConsumptionDate.Value.ToShortDateString();
            }
            this.SpendTotalID.Text = value.SpendTotal.ToString();
            if (value.DiscountType != null)
            {
                DiscountType.SelectedValue = value.DiscountType.Id.ToString();
            }
            AfterDiscountFree.Text = value.AfterDiscountFree.ToString();
            if (value.ScoreRule != null)
            {
                ScoreRuleID.SelectedValue = value.ScoreRule.Id.ToString();
            }
            ScoreID.Text        = value.Score.ToString();
            ReceiveMoneyID.Text = value.ReceiveMoney.ToString();

            RemarkID.Text          = value.Remark;
            ConsumerDetailsID.Text = value.ConsumerDetails;

            if (value.WritePerson != null)
            {
                WritePersonID.Text = value.WritePerson.OperatorName;
            }
            AspNetHelper.SetDropDownSelectedvalue(ConsumerBusinessType, value.ConsumerBusinessType);
            files.InnerHtml = AspNetHelper.DownLoadFile(value.FiledIds);

            if (value.BussinessPerson != null)
            {
                BussinessPersonID.SelectedValue = value.BussinessPerson.Id.ToString();
            }
        }
Beispiel #23
0
        private void BindDropDownList()
        {
            AspNetHelper.BindCustomer(this.CustomerID);
            AspNetHelper.BindBussinessPerson(this.SignPersonID);
            this.SettleStateID.Items.Clear();
            this.SettleStateID.Items.AddRange(AspNetHelper.GetFieldDescription(typeof(SettleState)));
            // 合同状态
            Dictionary <DropDownList, string> dic = new Dictionary <DropDownList, string>();

            dic[this.StateId] = "ContractState";
            AspNetHelper.BindDropDown(dic);
        }
Beispiel #24
0
        protected void Application_Error(object sender, EventArgs e)
        {
            log4net.LogManager.GetLogger(this.GetType()).Error(sender + e.ToString());

#if RELEASE
            Server.ClearError();
            string url = AspNetHelper.WebUrl() + "/Error.htm";
            Response.Redirect(url);
            //   Response.Write("程序出现错误,请重新操作");
            Response.End();
#endif
        }
Beispiel #25
0
        private void BindDropDown()
        {
            AspNetHelper.BindCustomer(this.CustomerID);

            var dic = new Dictionary <DropDownList, string>();

            dic[this.SuggestTypeID] = "SuggestType";
            dic[this.SolveTypeID]   = "SolveType";
            AspNetHelper.BindDropDown(dic);

            AspNetHelper.BindBussinessPerson(HandlerPersonID);
            AspNetHelper.BindBussinessPerson(DealPersonID);
        }
Beispiel #26
0
        /// <summary>
        /// 根据条件查询,返回查询后的DepartmentTree
        /// </summary>
        /// <param name="keyWord">关键词,为空表示查询整棵树</param>
        /// <returns></returns>
        public List <TreeNode> GetTree(string keyWord)
        {
            var pageQuery = new PageQuery <IDictionary <string, object>, Plug>(this.CurrentOperatorUser);

            pageQuery.Condition = new Dictionary <string, object>();
            if (!string.IsNullOrEmpty(txtQueryText.Text.Trim()))
            {
                pageQuery.Condition["PlugName"] = txtQueryText.Text.Trim();
            }
            pageQuery.CurrentPageIndex = 1;
            pageQuery.PageSize         = int.MaxValue;
            Service.Query(pageQuery);
            return(AspNetHelper.GetPlugChildNote(pageQuery.Result.ToList()));
        }
Beispiel #27
0
        protected override void FaceToData(ref Template model)
        {
            model.ModifyTime = DateTime.Now;

            model.TemplateName = this.TemplateNameID.Text;
            model.TemplateCode = this.TemplateCodeID.Text;
            model.MsgContent   = this.MsgContentID.Text;
            model.MsgType      = AspNetHelper.GetItemByDropDownValue(this.MsgTypeID);
            if (!this.IsEdit)
            {
                model.CreatePerson = this.CurrentOperatorUser;
                model.Company      = this.CurrentCompany;
            }
        }
Beispiel #28
0
        protected override void FaceToData(ref Financial model)
        {
            model.ModifyTime = DateTime.Now;

            model.Name          = this.NameID.Text;
            model.State         = StateId.SelectedValue == "1";
            model.CustomerName  = this.CustomerNameID.Text;
            model.FinancialDate = DateTime.Parse(this.FinancialDateID.Text);

            model.FinancialType = this.IsPay ? WebCrm.Model.FinancialType.Pay : WebCrm.Model.FinancialType.Receive;

            model.ChargePerson =
                DependencyResolver.Resolver <IUserInfoService>().FindById(int.Parse(ChargePersonID.SelectedValue));


            if (model.FinancialType == WebCrm.Model.FinancialType.Receive)
            {
                model.Customer =
                    DependencyResolver.Resolver <ICustomerService>().FindById(int.Parse(this.CustomerID.SelectedValue));

                if (model.Customer != null)
                {
                    model.CustomerName = this.CustomerNameID.Text;
                }
            }
            else
            {
                model.Cooperation =
                    DependencyResolver.Resolver <ICooperationService>().FindById(int.Parse(this.CustomerID.SelectedValue));


                if (model.Cooperation != null)
                {
                    model.CustomerName = this.CustomerNameID.Text;
                }
            }

            model.SumPrice    = decimal.Parse(this.SumPriceID.Text);
            model.TreatResult = this.TreatResultID.Text;
            model.Remark      = this.RemarkID.Text;
            if (!this.IsEdit)
            {
                model.Company = this.CurrentCompany;
            }
            model.FiledIds = model.FiledIds + "," + Request.GetRequestValue("fileID").Trim(',');
            if (this.IsPay)
            {
                model.FinancialPayType = AspNetHelper.GetItemByDropDownValue(this.FinancialPayTypeID);
            }
        }
Beispiel #29
0
        private void FaceToData(ref Advertising value)
        {
            value.Name         = this.NameID.Text;
            value.Content      = this.ContentID.Text;
            value.Remark       = this.RemarkID.Text;
            value.Free         = decimal.Parse(this.FreeID.Text);
            value.DeliveryDate = DateTime.Parse(this.DeliveryDateID.Text);
            value.WorkName     = this.DropWorkNameID.Text;

            value.State    = AspNetHelper.GetItemByDropDownValue(this.StateID);
            value.Evaluate = AspNetHelper.GetItemByDropDownValue(this.EvaluateID);
            value.Channel  = AspNetHelper.GetItemByDropDownValue(this.ChannelID);
            value.Company  = this.CurrentCompany;
            value.FiledIds = value.FiledIds + "," + Request.GetRequestValue("fileID").Trim(',');
        }
Beispiel #30
0
        protected override void FaceToData(ref Contract model)
        {
            model.ModifyTime = DateTime.Now;

            model.ContractName = this.ContractNameID.Text;
            model.State        = AspNetHelper.GetItemByDropDownValue(this.StateId);

            if (CustomerID.SelectedValue.IsInt())
            {
                model.Customer =
                    DependencyResolver.Resolver <ICustomerService>().FindById(
                        int.Parse(this.CustomerID.SelectedValue));
            }

            if (model.Customer != null)
            {
                model.CustomerName = model.Customer.ShortName;
            }
            else
            {
                model.CustomerName = CustomerNameID.Text;
            }

            model.ContractName = this.CodeID.Text;
            model.StartDate    = DateTime.Parse(this.StartDateID.Text);
            model.EndDate      = DateTime.Parse(this.EndDateID.Text);


            model.SignPerson =
                DependencyResolver.Resolver <IUserInfoService>().FindById(int.Parse(SignPersonID.SelectedValue));

            model.CustomerSignPerson = this.CustomerSignPersonID.Text;
            model.SignDate           = DateTime.Parse(this.SignDateID.Text);

            model.SignAddress = this.SignAddressID.Text;
            model.StorePlace  = this.StorePlaceID.Text;
            model.Sum         = decimal.Parse(this.SumID.Text);

            model.SettleState = this.SettleStateID.SelectedValue.Convert <SettleState>();
            model.Remark      = this.RemarkID.Text;
            model.Content     = this.ContentID.Text;

            model.Company = this.CurrentCompany;


            model.FiledIds = model.FiledIds + "," + Request.GetRequestValue("fileID").Trim(',');
        }