Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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;
        }
Esempio n. 4
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);
 }
Esempio n. 5
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();
            }
        }
Esempio n. 6
0
 private void DataToFace(Advertising value)
 {
     if (value == null)
     {
         FreeID.Text = "0";
         return;
     }
     this.NameID.Text         = value.Name;
     this.ContentID.Text      = value.Content;
     this.RemarkID.Text       = value.Remark;
     this.FreeID.Text         = value.Free.ToString();
     this.DeliveryDateID.Text = value.DeliveryDate.ToShortDateString();
     this.DropWorkNameID.Text = value.WorkName;
     AspNetHelper.SetDropDownSelectedvalue(this.StateID, value.State);
     AspNetHelper.SetDropDownSelectedvalue(this.EvaluateID, value.Evaluate);
     AspNetHelper.SetDropDownSelectedvalue(ChannelID, value.Channel);
     files.InnerHtml = AspNetHelper.DownLoadFile(value.FiledIds);
 }
Esempio n. 7
0
        protected override void DataToFace(Financial model)
        {
            if (model == null)
            {
                return;
            }
            this.NameID.Text          = model.Name;
            StateId.SelectedValue     = model.State ? "1" : "0";
            this.CustomerNameID.Text  = model.CustomerName;
            this.FinancialDateID.Text = model.FinancialDate.ToShortDateString();


            if (model.ChargePerson != null)
            {
                ChargePersonID.SelectedValue = model.ChargePerson.Id.ToString();
            }
            if (model.FinancialType == WebCrm.Model.FinancialType.Receive)
            {
                if (model.Customer != null)
                {
                    this.CustomerID.SelectedValue = model.Customer.Id.ToString();
                    this.CustomerNameID.Text      = model.Customer.ShortName;
                }
            }
            else
            {
                if (model.Cooperation != null)
                {
                    this.CustomerID.SelectedValue = model.Cooperation.Id.ToString();
                    this.CustomerNameID.Text      = model.Cooperation.Name;
                }
            }

            this.SumPriceID.Text    = model.SumPrice.ToString();
            this.TreatResultID.Text = model.TreatResult;

            this.RemarkID.Text = model.Remark;
            files.InnerHtml    = AspNetHelper.DownLoadFile(model.FiledIds);
            if (this.IsPay)
            {
                AspNetHelper.SetDropDownSelectedvalue(this.FinancialPayTypeID, model.FinancialPayType);
            }
        }
Esempio n. 8
0
        private void DataToFace(CompanyAction value)
        {
            if (value == null)
            {
                FreeID.Text = "0";
                return;
            }
            this.NameID.Text       = value.Name;
            this.ContentID.Text    = value.Content;
            this.RemarkID.Text     = value.Remark;
            this.FreeID.Text       = value.Free.ToString();
            this.ActionDateID.Text = value.ActionDate.ToShortDateString();
            if (value.WorkName != null)
            {
                this.DropWorkNameID.SelectedValue = value.WorkName.Id.ToString();
            }

            AspNetHelper.SetDropDownSelectedvalue(this.StateID, value.State);
            AspNetHelper.SetDropDownSelectedvalue(this.EvaluateID, value.Evaluate);
            files.InnerHtml = AspNetHelper.DownLoadFile(value.FiledIds);
        }
Esempio n. 9
0
        protected override void DataToFace(CustomerAgreement model)
        {
            if (model == null)
            {
                return;
            }
            this.SubjectID.Text = model.Subject;
            this.ContentID.Text = model.Content;
            if (model.Customer != null)
            {
                this.CustomerID.SelectedValue = model.Customer.Id.ToString();
            }
            this.ExpireID.Text = model.Expire.HasValue
                                         ? model.Expire.Value.ToString("yyyy-MM-dd")
                                         : string.Empty;



            AspNetHelper.SetDropDownSelectedvalue(this.AgreementTypeID, model.AgreementType);

            this.RemarkID.Text = model.Remark;
            files.InnerHtml    = AspNetHelper.DownLoadFile(model.FileIds);
        }
Esempio n. 10
0
        /// <summary>
        /// 显示数据
        /// </summary>
        /// <param name="customer"></param>
        private void DataToFace(Customer customer)
        {
            if (customer == null)
            {
                // 新增 初始化数据
                this.CreateTime.Text = DateTime.Now.ToShortDateString();

                //this.CreatePerson.Text = this.CurrentOperatorUser.OperatorName;

                //this.BodyWeightID.Text = "0";
                //this.HeightID.Text = "0";
                if (string.IsNullOrEmpty(this.Code.Text))
                {
                    this.GetCutomerId_Click(null, null);
                }
                return;
            }
            this.NameId.Text     = customer.Name;
            this.ShortName.Text  = customer.ShortName;
            this.RemarkID.Text   = customer.Remark;
            this.CreateTime.Text = customer.CreateTime.ToShortDateString();
            if (customer.Cagegory != null)
            {
                this.CagegoryTypeId.SelectedValue = customer.Cagegory.Id.ToString();
            }

            this.CarId.Text = customer.Car;
            this.Code.Text  = customer.Code;
            if (customer.MemberCard != null)
            {
                MemberCardID.Text = customer.MemberCard.CardCode;
            }
            if (customer.CreditRating != null)
            {
                CreditRatingID.SelectedValue = customer.CreditRating.Id.ToString();
            }
            if (customer.CustomerType != null && customer.CustomerType.ParentItem != null)
            {
                CustomerTypeParentId.SelectedValue = customer.CustomerType.ParentItem.Id.ToString();
                this.CustomerTypeParentId_SelectedIndexChanged(null, null); // 加载子类ID
                this.CustomerTypeItemId.SelectedValue = customer.CustomerType.Id.ToString();
            }

            this.IdentificationID.SelectedValue = customer.AccType ==
                                                  CustomerIdentification.Enterprise
                                                      ? "1"
                                                      : "0";

            this.ImportantLevelId.SelectedValue = ((int)customer.ImportantLevel).ToString();

            AspNetHelper.SetDropDownSelectedvalue(LevelSort, customer.LevelSort);

            AspNetHelper.SetDropDownSelectedvalue(RelationLevelID, customer.RelationLevel);
            if (customer.BelongPerson != null)
            {
                this.BelongPersonID.SelectedValue = customer.BelongPerson.Id.ToString();
            }

            if (customer.MemberCard != null)
            {
                this.MemberCardID.Text = customer.MemberCard.CardCode;
            }


            if (customer.Area != null)
            {
                if (customer.Area.ParentItem != null)
                {
                    this.AreaParentId.SelectedValue = customer.Area.ParentItem.Id.ToString();
                    this.AreaParentId_SelectedIndexChanged(null, null);
                }
                this.AreaId.SelectedValue = customer.Area.Id.ToString();
            }

            AspNetHelper.SetDropDownSelectedvalue(this.CustomerBusinessID, customer.CustomerBusiness);
            AspNetHelper.SetDropDownSelectedvalue(this.CustomerSourceID, customer.CustomerSource);
        }