コード例 #1
0
        void GetCustomerUnit()
        {
            int recordCount = 0;
            MLBCrmSearchInfo queryString = new MLBCrmSearchInfo();

            queryString.CrmName = Utils.GetQueryStringValue("q");
            StringBuilder sb = new StringBuilder();
            IList <EyouSoft.Model.CrmStructure.MLBCrmXuanYongInfo> ls = new EyouSoft.BLL.CrmStructure.BCrm().GetCrmsXuanYong(CurrentUserCompanyID, 35, 1, ref recordCount, null, queryString);

            if (ls != null && ls.Count > 0)
            {
                foreach (MLBCrmXuanYongInfo item in ls)
                {
                    sb.Append(item.Name + "|" + item.CrmId + "|" + (int)item.CrmType + "|" + item.KeHuDengJiBH);
                    if (item.Lxrs != null && item.Lxrs.Count > 0)
                    {
                        sb.Append("|" + item.Lxrs[0].Id + "|" + item.Lxrs[0].Name + "|" + item.Lxrs[0].MobilePhone + "|" + item.Lxrs[0].Telephone + "\n");
                    }
                    else
                    {
                        sb.Append("|-1|无联系人|-1|-1 \n");
                    }
                }
            }
            else
            {
                sb.Append("无匹配项|-1|-1|无联系人|-1|-1|");
            }
            AjaxResponse(sb.ToString());
        }
コード例 #2
0
        /// <summary>
        /// 初始化页面信息
        /// </summary>
        private void PageInit()
        {
            EyouSoft.BLL.CrmStructure.BCrm   bCrm = new EyouSoft.BLL.CrmStructure.BCrm();
            EyouSoft.Model.CrmStructure.MCrm mCrm = bCrm.GetInfo(SiteUserInfo.TourCompanyInfo.CompanyId);
            if (null != mCrm)
            {
                if (!string.IsNullOrEmpty(mCrm.PrintHeader))
                {
                    this.lblPrintHeader.Text = string.Format("<span class='upload_filename'><a href='{0}'>打印页眉</a><a href=\"javascript:void(0)\" onclick=\"ConfigSettings.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"PrintHeader\" value='{0}'/></span>", mCrm.PrintHeader);
                }

                if (!string.IsNullOrEmpty(mCrm.PrintFooter))
                {
                    this.lblPrintFooter.Text = string.Format("<span class='upload_filename'><a href='{0}'>打印页脚</a><a href=\"javascript:void(0)\" onclick=\"ConfigSettings.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"PrintFooter\" value='{0}'/></span>", mCrm.PrintFooter);
                }

                if (!string.IsNullOrEmpty(mCrm.PrintTemplates))
                {
                    this.lblPrintTemplates.Text = string.Format("<span class='upload_filename'><a href='{0}' target='_blank'>打印模板</a><a href=\"javascript:void(0)\" onclick=\"ConfigSettings.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"PrintTemplates\" value='{0}'/></span>", mCrm.PrintTemplates);
                }

                if (!string.IsNullOrEmpty(mCrm.Seal))
                {
                    this.lblSeal.Text = string.Format("<span class='upload_filename'><a href='{0}'>公司公章</a><a href=\"javascript:void(0)\" onclick=\"ConfigSettings.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"Seal\" value='{0}'/></span>", mCrm.Seal);
                }
            }
        }
コード例 #3
0
        /// <summary>
        /// 保存操作
        /// </summary>
        /// <returns></returns>
        private string Save()
        {
            string printHead = Utils.GetFormValue(this.UploadControl1.ClientHideID);

            if (!string.IsNullOrEmpty(printHead))
            {
                printHead = printHead.Split('|')[1];
            }
            else
            {
                printHead = Utils.GetFormValue("PrintHeader");
            }


            string printFooter = Utils.GetFormValue(this.UploadControl2.ClientHideID);

            if (!string.IsNullOrEmpty(printFooter))
            {
                printFooter = printFooter.Split('|')[1];
            }
            else
            {
                printFooter = Utils.GetFormValue("PrintFooter");
            }

            string printTemplates = Utils.GetFormValue(this.UploadControl3.ClientHideID);

            if (!string.IsNullOrEmpty(printTemplates))
            {
                printTemplates = printTemplates.Split('|')[1];
            }
            else
            {
                printTemplates = Utils.GetFormValue("PrintTemplates");
            }

            string seal = Utils.GetFormValue(this.UploadControl4.ClientHideID);

            if (!string.IsNullOrEmpty(seal))
            {
                seal = seal.Split('|')[1];
            }
            else
            {
                seal = Utils.GetFormValue("Seal");
            }

            EyouSoft.BLL.CrmStructure.BCrm bCrm = new EyouSoft.BLL.CrmStructure.BCrm();

            if (bCrm.UpdatePrintSet(SiteUserInfo.TourCompanyInfo.CompanyId, printHead, printFooter, printTemplates, seal))
            {
                return(EyouSoft.Common.UtilsCommons.AjaxReturnJson("1", "打印设置成功! 正在跳转..."));
            }
            else
            {
                return(EyouSoft.Common.UtilsCommons.AjaxReturnJson("0", "打印设置失败!"));
            }
        }
コード例 #4
0
ファイル: Account.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 绑定客户单位联系人
        /// </summary>
        void InitCrmLxrs()
        {
            var items = new EyouSoft.BLL.CrmStructure.BCrm().GetCrmUsers(Utils.GetQueryStringValue("crmId"));

            if (items != null && items.Count > 0)
            {
                rtpLxrs.DataSource = items;
                rtpLxrs.DataBind();
            }
        }
コード例 #5
0
ファイル: List.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 初始化
        /// </summary>
        void DataInit()
        {
            pageIndex = UtilsCommons.GetPadingIndex();

            var items = new EyouSoft.BLL.CrmStructure.BCrm().GetCrmsPersonal(CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, GetSearchInfo());

            if (items != null && items.Count > 0)
            {
                rptList.DataSource = items;
                rptList.DataBind();
            }

            BindPage();
        }
コード例 #6
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            int sl = Utils.GetInt(Utils.GetQueryStringValue("sl"), 0);

            //获取分页参数并强转
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            //省份
            int dplProvince = Utils.GetInt(Utils.GetQueryStringValue("ddlProvice"));
            //城市
            int dplCity = Utils.GetInt(Utils.GetQueryStringValue("ddlCity"));
            //单位名称
            string txtUnitName = Utils.GetQueryStringValue("txtUnitName");
            //联系人
            //string txtlinkManName = Utils.GetQueryStringValue("txtlinkManName");
            //客户等级
            int ddlLevId = Utils.GetInt(Utils.GetQueryStringValue("ddlLevId"));
            //责任销售
            string txtSellerId = Utils.GetQueryStringValue("txtSellerId");

            EyouSoft.BLL.CrmStructure.BCrm crmBll = new EyouSoft.BLL.CrmStructure.BCrm();
            //EyouSoft.Model.CrmStructure.MCustomerListModel searchModel = new EyouSoft.Model.CrmStructure.MCustomerListModel();
            //searchModel.CityId = dplCity;
            //searchModel.CompanyId = base.SiteUserInfo.CompanyId;
            //searchModel.LevId = ddlLevId;
            //searchModel.Name = txtUnitName;
            //searchModel.ProvinceId = dplProvince;
            //searchModel.SellerId = txtSellerId;
            //searchModel.DeptId = base.SiteUserInfo.DeptId;
            //searchModel.LinkManName = txtlinkManName;
            //searchModel.Type = EyouSoft.Model.EnumType.CrmStructure.CrmType.单位直客;
            //IList<EyouSoft.Model.CrmStructure.MCustomerListModel> list = crmBll.GetUnitCustomerShowModel(searchModel, pageIndex, pageSize, ref recordCount);
            object list = null;

            if (list != null)
            {
                rptList.DataSource = list;
                rptList.DataBind();
                //绑定分页
                BindPage();
            }
            else
            {
                rptList.Controls.Add(new Label()
                {
                    Text = "对不起,没有相关数据!"
                });
                ExporPageInfoSelect1.Visible = false;
                ExporPageInfoSelect2.Visible = false;
            }
        }
コード例 #7
0
        /// <summary>
        /// 验证客户单位责任销售
        /// </summary>
        void YanZhengZeRenXiaoShou()
        {
            string crmId    = Utils.GetQueryStringValue("keHuDanWeiId");
            string sellerId = Utils.GetQueryStringValue("zenRenXiaoShouId");

            var bllRetCode = new EyouSoft.BLL.CrmStructure.BCrm().YanZhengZeRenXiaoShou(crmId, sellerId);

            if (bllRetCode)
            {
                Utils.RCWE("{\"retCode\":true}");
            }

            Utils.RCWE("{\"retCode\":false}");
        }
コード例 #8
0
        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="id">删除ID</param>
        /// <returns></returns>
        private string DeleteData(string id)
        {
            string msg = string.Empty;

            EyouSoft.BLL.CrmStructure.BCrm crmBll = new EyouSoft.BLL.CrmStructure.BCrm();
            string[] crmIdList = id.Split(new char[] { ',' });
            int      result    = 0;//crmBll.DeleteUnitCustomerModel(crmIdList);

            if (result > 0)
            {
                msg = "1";
            }
            else
            {
                msg = "0";
            }
            return(msg);
        }
コード例 #9
0
ファイル: AjaxOwed.aspx.cs プロジェクト: windygu/XiaZhou
        private void BindData(string crmId, string type)
        {
            EyouSoft.BLL.CrmStructure.BCrm crmBll = new EyouSoft.BLL.CrmStructure.BCrm();
            IList <EyouSoft.Model.CrmStructure.MOwedRecord> list = crmBll.GetOwedRecordList(base.SiteUserInfo.CompanyId, crmId, pageIndex, pageSize, ref recordCount);

            if (list != null && list.Count > 0)
            {
                rptQKXXList.DataSource = list;
                rptQKXXList.DataBind();
                BindPage(type);
            }
            else
            {
                this.rptQKXXList.Controls.Add(new Label()
                {
                    Text = "<tr><td colspan='6' align='center'>未找到相关数据!</td></tr>"
                });
                ExporPageInfoSelect1.Visible = false;
            }
        }
コード例 #10
0
        /// <summary>
        /// 初始化
        /// </summary>
        void DataInit()
        {
            pageIndex = UtilsCommons.GetPadingIndex();

            EyouSoft.Model.EnumType.CrmStructure.CrmType crmType = EyouSoft.Model.EnumType.CrmStructure.CrmType.行客户;
            if (Menu2Type == Menu2.客户管理_单位直客)
            {
                crmType = EyouSoft.Model.EnumType.CrmStructure.CrmType.单位直客;
            }

            var items = new EyouSoft.BLL.CrmStructure.BCrm().GetCrms(CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, crmType, GetSearchInfo());

            if (items != null && items.Count > 0)
            {
                rptList.DataSource = items;
                rptList.DataBind();
            }

            BindPage();
        }
コード例 #11
0
ファイル: Edit.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 保存常用设置
        /// </summary>
        void SaveChangYongSheZhi()
        {
            if (!IsSetChangYong)
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-1"));
            }
            if (IsAdd)
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-2"));
            }
            string editid = Utils.GetQueryStringValue("crmId");

            if (string.IsNullOrEmpty(editid))
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-3"));
            }
            var info = new EyouSoft.BLL.CrmStructure.BCrm().GetInfo(editid);

            if (info == null)
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-4"));
            }

            info.AmountOwed     = Utils.GetDecimal(Utils.GetFormValue("txtAmountOwed"), 5000);
            info.Deadline       = Utils.GetInt(Utils.GetFormValue("txtDeadline"), 10);
            info.IsSignContract = Utils.GetFormValue(rbtnIsSignContractYes.UniqueID) == "rbtnIsSignContractYes";
            info.AttachModel    = GetAttach();
            if (info.AttachModel != null)
            {
                info.AttachModel.ItemId = info.CrmId;
            }
            info.BankList        = GetBanks();
            info.FinancialMobile = Utils.GetFormValue(txtFinancialMobile.UniqueID);
            info.FinancialName   = Utils.GetFormValue(txtFinancialName.UniqueID);
            info.FinancialPhone  = Utils.GetFormValue(txtFinancialPhone.UniqueID);

            int bllRetCode = new EyouSoft.BLL.CrmStructure.BCrm().Update(info);

            AjaxResponse(UtilsCommons.AjaxReturnJson(bllRetCode == 1 ? "1" : "0"));
        }
コード例 #12
0
ファイル: Account.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 设置客户单位用户信息
        /// </summary>
        void SetCrmUser()
        {
            string crmId    = Utils.GetFormValue("crmid");
            string lxrId    = Utils.GetFormValue("lxrid");
            string username = Utils.GetFormValue("username");
            var    pwd      = new EyouSoft.Model.ComStructure.MPasswordInfo()
            {
                NoEncryptPassword = Utils.GetFormValue("pwd")
            };

            int bllRetCode = new EyouSoft.BLL.CrmStructure.BCrm().SetCrmUser(CurrentUserCompanyID, SiteUserInfo.UserId, crmId, lxrId, username, pwd);

            if (bllRetCode == 1)
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
            }
            else if (bllRetCode == -1)
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-1"));
            }

            AjaxResponse(UtilsCommons.AjaxReturnJson("0"));
        }
コード例 #13
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void BindSource()
        {
            EyouSoft.BLL.CrmStructure.BCrm   bCrm = new EyouSoft.BLL.CrmStructure.BCrm();
            EyouSoft.Model.CrmStructure.MCrm mCrm = bCrm.GetInfo(SiteUserInfo.TourCompanyInfo.CompanyId);
            //查询国家、省市区域的
            EyouSoft.BLL.ComStructure.BComCity bComCity = new EyouSoft.BLL.ComStructure.BComCity();
            EyouSoft.Model.ComStructure.MCPCC  m        = bComCity.GetCPCD(CurrentUserCompanyID, mCrm.CountryId, mCrm.ProvinceId, mCrm.CityId, mCrm.CountyId);
            if (m != null)
            {
                this.lblCountry.Text = m.CountryName;
                this.lblProvice.Text = m.ProvinceName;
                this.lblCity.Text    = m.CityName;
                this.lblCounty.Text  = m.CountyName;
            }

            this.lblName.Text                      = mCrm.Name;
            this.lblAddress.Text                   = mCrm.Address;
            this.lblOrganizationCode.Text          = mCrm.OrganizationCode;
            this.lblLegalRepresentative.Text       = mCrm.LegalRepresentative;
            this.lblLegalRepresentativeMobile.Text = mCrm.LegalRepresentativeMobile;
            this.lblLegalRepresentativePhone.Text  = mCrm.LegalRepresentativePhone;
            this.lblLicense.Text                   = mCrm.License;
            this.lblFinancialName.Text             = mCrm.FinancialName;
            this.lblFinancialPhone.Text            = mCrm.FinancialPhone;
            this.lblFinancialMobile.Text           = mCrm.FinancialMobile;

            //查询销售员
            EyouSoft.BLL.ComStructure.BComUser   bUser = new EyouSoft.BLL.ComStructure.BComUser();
            EyouSoft.Model.ComStructure.MComUser user  = bUser.GetModel(mCrm.SellerId, SiteUserInfo.CompanyId);
            if (null != user)
            {
                this.lblSeller.Text = user.UserName;
            }

            this.lblBrevityCode.Text  = mCrm.BrevityCode;
            this.lblRebatePolicy.Text = mCrm.RebatePolicy;
        }
コード例 #14
0
ファイル: Edit.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// init edit info
        /// </summary>
        void InitEditInfo()
        {
            string editid = Utils.GetQueryStringValue("crmId");

            EyouSoft.Model.CrmStructure.MCrm model = new EyouSoft.BLL.CrmStructure.BCrm().GetInfo(editid);
            if (model == null)
            {
                return;
            }

            txtAddress.Text                  = model.Address;
            txtLegalRepresentative.Text      = model.LegalRepresentative;
            txtLegalRepresentativePhone.Text = model.LegalRepresentativePhone;
            txtLicense.Text                  = model.License;
            txtName.Text             = model.Name;
            txtOrganizationCode.Text = model.OrganizationCode;
            //txtRebatePolicy.Text = model.RebatePolicy;
            Seller1.SellsID          = model.SellerId;
            Seller1.SellsName        = model.SellerName;
            ddlCity.SelectedValue    = model.CityId.ToString();
            ddlLevId.SelectedValue   = model.LevId.ToString();
            ddlProvice.SelectedValue = model.ProvinceId.ToString();
            Province                          = model.ProvinceId.ToString();
            City                              = model.CityId.ToString();
            Country                           = model.CountryId.ToString();
            County                            = model.CountyId.ToString();
            txtBrevityCode.Text               = model.BrevityCode;
            txtFinancialMobile.Text           = model.FinancialMobile;
            txtFinancialName.Text             = model.FinancialName;
            txtFinancialPhone.Text            = model.FinancialPhone;
            txtLegalRepresentativeMobile.Text = model.LegalRepresentativeMobile;

            txtAmountOwed.Text = model.AmountOwed.ToString("F2");
            txtDeadline.Text   = model.Deadline.ToString();
            if (model.IsSignContract)
            {
                rbtnIsSignContractYes.Checked = true;
            }
            else
            {
                rbtnIsSignContractNo.Checked = true;
            }

            if (model.AttachModel != null)
            {
                lblFile.Text = "<span class='upload_filename' id=\"spanLatestAttach\">&nbsp;<a href='" + model.AttachModel.FilePath + "' target='_blank'>查看附件</a><a href='javascript:void(0);' onclick=\"CustomerEdit.delLatestAttach()\"> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='txtLatestAttach' value='" + model.AttachModel.Name + "|" + model.AttachModel.FilePath + "'></span>";
            }

            if (model.BankList != null && model.BankList.Count > 0)
            {
                rptJSZHList.DataSource = model.BankList;
                rptJSZHList.DataBind();
            }
            else
            {
                IList <EyouSoft.Model.CrmStructure.MCrmBank> list = new List <EyouSoft.Model.CrmStructure.MCrmBank>();
                list.Add(new EyouSoft.Model.CrmStructure.MCrmBank()
                {
                    BankAccount = string.Empty, BankName = string.Empty
                });
                rptJSZHList.DataSource = list;
                rptJSZHList.DataBind();
            }

            if (model.LinkManList != null && model.LinkManList.Count > 0)
            {
                rptCYLXRList.DataSource = model.LinkManList;
                rptCYLXRList.DataBind();
            }
            else
            {
                IList <EyouSoft.Model.CrmStructure.MCrmLinkman> list = new List <EyouSoft.Model.CrmStructure.MCrmLinkman>();
                list.Add(new EyouSoft.Model.CrmStructure.MCrmLinkman()
                {
                    Department = string.Empty, Name = string.Empty, Telephone = string.Empty, MobilePhone = string.Empty, Birthday = null, QQ = string.Empty, Fax = string.Empty, Address = string.Empty, IsRemind = false, UserId = string.Empty
                });
                rptCYLXRList.DataSource = list;
                rptCYLXRList.DataBind();
            }

            //如果没有修改别人数据的权限
            if (!SiteUserInfo.IsHandleElse)
            {
                if (model.SellerId != SiteUserInfo.UserId)
                {
                    this.phdSave.Visible = false;
                }
            }

            if (IsSetChangYong)
            {
                phChangYongSheZhi.Visible = true;
            }

            if (!IsSetZeRenXiaoShou)
            {
                this.Seller1.ReadOnly     = true;
                this.Seller1.IsShowSelect = false;

                txtFinancialPhone.ReadOnly = txtFinancialMobile.ReadOnly = txtFinancialName.ReadOnly = true;
            }
        }
コード例 #15
0
ファイル: Edit.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 保存按钮点击事件执行方法
        /// </summary>
        void Save()
        {
            string editid = Utils.GetQueryStringValue("crmId");

            EyouSoft.Model.CrmStructure.MCrm info = new EyouSoft.Model.CrmStructure.MCrm();
            if (IsEdit)
            {
                info = new EyouSoft.BLL.CrmStructure.BCrm().GetInfo(editid);
            }

            #region 客户信息
            //客户信息
            info.Address                  = Utils.GetFormValue(txtAddress.UniqueID);                  //地址
            info.CityId                   = Utils.GetInt(Utils.GetFormValue(ddlCity.UniqueID), 0);    //城市
            info.CompanyId                = CurrentUserCompanyID;                                     //公司编号
            info.IssueTime                = DateTime.Now;                                             //添加时间
            info.LegalRepresentative      = Utils.GetFormValue(txtLegalRepresentative.UniqueID);      //法人代表
            info.LegalRepresentativePhone = Utils.GetFormValue(txtLegalRepresentativePhone.UniqueID); //法人代表电话
            info.LevId            = Utils.GetInt(Utils.GetFormValue(ddlLevId.UniqueID), 0);           //客户等级
            info.License          = Utils.GetFormValue(txtLicense.UniqueID);                          //许可证号
            info.Name             = Utils.GetFormValue(txtName.UniqueID);                             //单位名称
            info.OperatorId       = SiteUserInfo.UserId;                                              //操作人
            info.OrganizationCode = Utils.GetFormValue(txtOrganizationCode.UniqueID);                 //机构代码
            info.ProvinceId       = Utils.GetInt(Utils.GetFormValue(ddlProvice.UniqueID), 0);         //省份
            //info.RebatePolicy = Utils.GetFormValue(txtRebatePolicy.UniqueID);//返利政策
            EyouSoft.Model.EnumType.CrmStructure.CrmType crmType = EyouSoft.Model.EnumType.CrmStructure.CrmType.行客户;
            if (Menu2Type == EyouSoft.Model.EnumType.PrivsStructure.Menu2.客户管理_单位直客)
            {
                crmType = EyouSoft.Model.EnumType.CrmStructure.CrmType.单位直客;
            }
            info.Type        = crmType;
            info.BrevityCode = Utils.GetFormValue(txtBrevityCode.UniqueID);                             //简码
            info.CountryId   = Utils.GetInt(Utils.GetFormValue(ddlCountry.UniqueID), 0);                //国家
            info.CountyId    = Utils.GetInt(Utils.GetFormValue(ddlCounty.UniqueID), 0);                 //县区
            info.DeptId      = SiteUserInfo.DeptId;                                                     //操作人部门
            info.LegalRepresentativeMobile = Utils.GetFormValue(txtLegalRepresentativeMobile.UniqueID); //法人代表手机
            #endregion

            #region 客户信息 特殊权限控制部分
            //客户信息 特殊权限控制部分
            if (IsEdit)
            {
                if (IsSetZeRenXiaoShou)
                {
                    info.SellerId = Utils.GetFormValue(Seller1.SellsIDClient);
                }

                if (IsSetChangYong)
                {
                    info.AmountOwed     = Utils.GetDecimal(Utils.GetFormValue("txtAmountOwed"), 5000);
                    info.Deadline       = Utils.GetInt(Utils.GetFormValue("txtDeadline"), 10);
                    info.IsSignContract = Utils.GetFormValue(rbtnIsSignContractYes.GroupName) == "rbtnIsSignContractYes";
                    info.AttachModel    = GetAttach();
                    if (info.AttachModel != null)
                    {
                        info.AttachModel.ItemId = info.CrmId;
                    }
                    info.BankList = GetBanks();

                    info.FinancialMobile = Utils.GetFormValue(txtFinancialMobile.UniqueID);
                    info.FinancialName   = Utils.GetFormValue(txtFinancialName.UniqueID);
                    info.FinancialPhone  = Utils.GetFormValue(txtFinancialPhone.UniqueID);
                }
            }

            if (IsAdd)
            {
                if (IsSetZeRenXiaoShou)
                {
                    info.SellerId = Utils.GetFormValue(Seller1.SellsIDClient);
                }
                else
                {
                    info.SellerId = SiteUserInfo.UserId;
                }

                if (IsSetChangYong)
                {
                    info.AmountOwed     = Utils.GetDecimal(Utils.GetFormValue("txtAmountOwed"), 5000);
                    info.Deadline       = Utils.GetInt(Utils.GetFormValue("txtDeadline"), 10);
                    info.IsSignContract = Utils.GetFormValue(rbtnIsSignContractYes.UniqueID) == "rbtnIsSignContractYes";
                    info.AttachModel    = GetAttach();
                    if (info.AttachModel != null)
                    {
                        info.AttachModel.ItemId = info.CrmId;
                    }
                    info.BankList = GetBanks();
                }
                else
                {
                    info.AmountOwed     = 5000;
                    info.Deadline       = 10;
                    info.IsSignContract = false;
                    info.AttachModel    = null;
                    info.BankList       = null;
                }

                info.FinancialMobile = Utils.GetFormValue(txtFinancialMobile.UniqueID);
                info.FinancialName   = Utils.GetFormValue(txtFinancialName.UniqueID);
                info.FinancialPhone  = Utils.GetFormValue(txtFinancialPhone.UniqueID);
            }

            #endregion

            info.LinkManList = GetLxrs();//联系人

            //表单验证

            int retcode = 0;
            if (IsEdit)
            {
                retcode = new EyouSoft.BLL.CrmStructure.BCrm().Update(info);
            }
            if (IsAdd)
            {
                retcode = new EyouSoft.BLL.CrmStructure.BCrm().Insert(info);
            }

            AjaxResponse(UtilsCommons.AjaxReturnJson(retcode == 1 ? "1" : "0"));
        }