Пример #1
0
        public TdCustomerRequest getCustomerInfo()
        {
            TdCustomerRequest ret = new TdCustomerRequest();

            ret.name          = TextBox_companyname.Text;
            ret.web_site      = TextBox_www.Text;
            ret.contact_man   = TextBox_contactman.Text;
            ret.tel           = TextBox_tel.Text.Trim();
            ret.ext           = TextBox_extend.Text;
            ret.position      = TextBox_position.Text;
            ret.mobile        = TextBox_moblie.Text.Trim();
            ret.fax           = TextBox_fax.Text.Trim();
            ret.email         = TextBox_email.Text.Trim();
            ret.industry_type = DropDownList_industryType.SelectedItem.Text;
            ret.buy_intent    = DropDownList_buyIntent.SelectedItem.Text;
            ret.source        = DropDownList_visitType.SelectedItem.Text;
            //if (DropDownList_visitType.SelectedIndex > 0)
            //{
            //    ret.VisitType = DropDownList_visitType.SelectedItem.Text;
            //}
            ret.rank_id = int.Parse(DropDownList_customerRank.SelectedValue);
            ret.area    = DropDownList_area.SelectedItem.Text;
            //if (DropDownList_village.SelectedIndex > 0)
            //{
            //    ret.Village = DropDownList_village.SelectedItem.Text;
            //}
            ret.address  = TextBox_address.Text;
            ret.remark   = TextBox_remark.Text;
            ret.keywords = TextBox_keyword.Text;

            //if (CtrlAction == CommandNameType.EDIT)
            //{
            //    if (!ViewState[CustomersData.RANKID_FIELDS].ToString().Equals(DropDownList_customerRank.SelectedItem.Text))
            //    {
            //        HistoryDO rank = new HistoryDO();
            //        rank.ChangeDate = DateTime.Now;
            //        rank.ColumnName = "成熟度";
            //        rank.CustomerId = int.Parse(CustomerId);
            //        rank.NewValue = DropDownList_customerRank.SelectedItem.Text;
            //        rank.OldValue = ViewState[CustomersData.RANKID_FIELDS].ToString();
            //        rank.PersonName = LoginSession.GetCurrentUser(this.Page).RealName;
            //        ChangeHistory[0] = rank;
            //    }
            //}
            return(ret);
        }
Пример #2
0
        /// <summary>
        /// 保存客户的基本信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_saveCustomer_Click(object sender, System.EventArgs e)
        {
            TdCustomerRequest request = CustomerInfo_edit.getCustomerInfo();
            TdCustomerResult  res     = customerService.SaveCustomer(request);

            //CustomerDO customerNew = CustomerInfo_edit.getCustomerInfo();
            ////dr[CustomersData.COMPANYNAME_FIELDS] = customerNew.CompanyName;
            //dr[CustomersData.WEBSITE_FIELDS] = customerNew.Website;
            //dr[CustomersData.CONTACTMAN_FIELDS] = customerNew.ContactMan;
            //dr[CustomersData.TEL_FIELDS] = customerNew.Tel;
            //dr[CustomersData.EXTENSION_FIELDS] = customerNew.Extension;
            //dr[CustomersData.POSITION_FIELDS] = customerNew.Position;
            //dr[CustomersData.MOBILE_FIELDS] = customerNew.Mobile;
            //dr[CustomersData.FAX_FIELDS] = customerNew.Fax;
            //dr[CustomersData.EMAIL_FIELDS] = customerNew.Email;
            //dr[CustomersData.INDUSTRYTYPE_FIELDS] = customerNew.IndustryType;
            //dr[CustomersData.BUYINTENT_FIELDS] = customerNew.BuyIntent;
            //dr[CustomersData.VISITTYPE_FIELDS] = customerNew.VisitType;
            //dr[CustomersData.RANKID_FIELDS] = customerNew.RankId;
            //dr[CustomersData.AREA_FIELDS] = customerNew.Area;
            //dr[CustomersData.VILLAGE_FIELDS] = customerNew.Village;
            //dr[CustomersData.ADDRESS_FIELDS] = customerNew.Address;
            //dr[CustomersData.REMARK_FIELDS] = customerNew.Remark;
            //dr[CustomersData.KEYWORDS_FIELDS] = customerNew.Keywords;

            //dataCommon.UpdateData(ds);

            //customerService.AddChangeHistory(CustomerInfo_edit.ChangeHistory);
            //HistoryDataBind();
            if (res.result)
            {
                AddLoadMessage("客户信息被成功保存");
            }
            else
            {
                AddLoadMessage(res.msg);
            }
        }