コード例 #1
0
ファイル: Customer_info.aspx.cs プロジェクト: chenxun/ecrm
        /// <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);
            }
        }
コード例 #2
0
ファイル: Customer_info.aspx.cs プロジェクト: chenxun/ecrm
        /// <summary>
        /// 显示客户的基本数据
        /// </summary>
        void CustomerDataBind()
        {
            //this.form1.
            if (the_customer == null)
            {
                return;
            }
            CustomerInfo_edit.CustomerDataBind(the_customer);
            //CustomerInfo_edit.CustomerId = str_id;

            //this.thistitle.Text = CustomerInfo_edit.getCustomerInfo().CompanyName;

            // 检查按钮是否显示 [5/27/2009]
            CheckButton();

            VisitRecordDataBind(the_customer.id);
            //HistoryDataBind();
            //OrderDataBind();
            //NewProjectDataBind();

            // 显示上次的拜访计划 [5/24/2009]
            FindPicker(PickerAndCalendar_addVisitRecord_nextVisit).SelectedDate = DateTime.Now.AddDays(1);
            FindPicker(PickerAndCalendar_newproject).SelectedDate = DateTime.Now.AddDays(7);
            TextBox_addVisit_nextVisit.Text = "";
            // 这里要显示以前的拜访计划的 [3/5/2009]
            DataSet ds = new DataSet();
            //dataCommon.GetAllData(string.Format("select * from _VisitPlan where CustomerId={0} and PlanType=1 and PlanStatus='{1}' order by Id desc", CustomerInfo_edit.CustomerId, CustomerService.PLANSTATUS_PENDING), ds, VisitPlanData._VISITPLAN_TABLE);
            //if (ds.Tables[VisitPlanData._VISITPLAN_TABLE].Rows.Count == 0)
            //{
            //    Label_visitPlan.Text = "暂时没有跟进计划";
            //}
            //else
            //{
            //    DataRow dr = ds.Tables[VisitPlanData._VISITPLAN_TABLE].Rows[0];
            //    Label_visitPlan.Text = string.Format("您计划在 {0} 跟进该客户,请注意以下信息:<br>{1}", Convert.ToDateTime(dr[VisitPlanData.VISITPLANDATE_FIELDS]).ToShortDateString(), dr[VisitPlanData.REMARK_FIELDS]);
            //}
        }