Beispiel #1
0
        /// <summary>
        /// 保存数据方法
        /// </summary>
        private void DataSave()
        {
            CustomerBase _CustomerBase = new CustomerBase();

            _CustomerBase.CA01002 = this.txtCA01002.Text.Trim();
            _CustomerBase.CA01003 = this.txtCA01003.Text.Trim();
            _CustomerBase.CA01004 = this.txtCA01004.Text.Trim().Replace("'", "’");
            _CustomerBase.CA01005 = this.txtCA01005.Text.Trim();
            _CustomerBase.CA01006 = this.txtCA01006.Text.Trim();
            _CustomerBase.CA01007 = this.txtCA01007.Text.Trim();
            _CustomerBase.CA01008 = this.txtCA01008.Text.Trim();
            _CustomerBase.CA01009 = this.txtCA01009.Text.Trim();
            _CustomerBase.CA01010 = this.txtCA01010.Text.Trim();
            _CustomerBase.CA01011 = this.txtCA01011.Text.Trim();
            _CustomerBase.CA01012 = this.txtCA01012.Text.Trim();
            _CustomerBase.CA01013 = Request.Form["ddlGA03City"]; //html控件
            _CustomerBase.CA01014 = this.txtCA01014.Text.Trim();
            _CustomerBase.CA01015 = this.txtCA01015.Text.Trim();
            _CustomerBase.CA01016 = Convert.ToInt32(this.ddlCA01016.SelectedValue);
            _CustomerBase.CA01017 = this.txtCA01017.Text.Trim();
            _CustomerBase.CA01018 = this.ddlCA01018.SelectedValue;
            _CustomerBase.CA01019 = Convert.ToInt32(this.ddlCA01019.SelectedValue);
            _CustomerBase.CA01020 = Convert.ToInt32(Request.Form["ddlCA01020"]);//html控件
            _CustomerBase.CA01021 = this.txtCA01021.Text.Trim();
            _CustomerBase.CA01022 = this.ddlCA01022.SelectedValue;
            _CustomerBase.CA01023 = this.ddlCA01023.SelectedValue;
            if (this.rbtnCA01024Yes.Checked)
            {
                _CustomerBase.CA01024 = 1;
            }
            if (this.rbtnCA01024No.Checked)
            {
                _CustomerBase.CA01024 = 0;
            }
            if (this.rbtnCA01025Yes.Checked)
            {
                _CustomerBase.CA01025 = 1;
            }
            if (this.rbtnCA01025No.Checked)
            {
                _CustomerBase.CA01025 = 0;
            }
            _CustomerBase.CA01026 = this.txtCA01026.Text.Trim();

            _CustomerBase.CA01027 = this.txtCA01027.Text.Trim();
            _CustomerBase.CA01028 = this.txtCA01028.Text.Trim();
            _CustomerBase.CA01029 = this.txtCA01029.Text.Trim().StartsWith("http://") ? this.txtCA01029.Text.Trim() : "http://" + this.txtCA01029.Text.Trim();
            _CustomerBase.CA01030 = this.txtCA01030.Text.Trim();
            _CustomerBase.CA01031 = this.txtCA01031.Text.Trim();
            _CustomerBase.CA01032 = this.txtCA01032.Text.Trim();
            _CustomerBase.CA01033 = this.txtCA01033.Text.Trim();
            _CustomerBase.CA01034 = this.txtCA01034.Text.Trim();
            _CustomerBase.CA01035 = this.txtCA01035.Text.Trim();
            _CustomerBase.CA01036 = this.txtCA01036.Text.Trim();
            _CustomerBase.CA01037 = this.txtCA01037.Text.Trim();
            _CustomerBase.CA01038 = this.txtCA01038.Text.Trim();
            _CustomerBase.CA01039 = this.txtCA01039.Text.Trim();
            _CustomerBase.CA01040 = this.txtCA01040.Text.Trim();
            _CustomerBase.CA01041 = this.txtCA01041.Text.Trim();
            _CustomerBase.CA01042 = this.txtCA01042.Text.Trim();
            _CustomerBase.CA01043 = this.txtCA01043.Text.Trim();
            _CustomerBase.CA01044 = this.txtCA01044.Text.Trim();
            _CustomerBase.CA01045 = this.txtCA01045.Text.Trim();
            _CustomerBase.CA01046 = this.txtCA01046.Text.Trim();
            _CustomerBase.CA01048 = this.txtCA01048.Text.Trim();
            _CustomerBase.CA01049 = this.txtCA01049.Text.Trim();
            _CustomerBase.CA01050 = this.txtCA01050.Text.Trim();
            _CustomerBase.CA01051 = this.txtCA01051.Text.Trim();
            if (this.rbtnCA01047Yes.Checked)
            {
                _CustomerBase.CA01047 = 1;
            }
            if (this.rbtnCA01047No.Checked)
            {
                _CustomerBase.CA01047 = 0;
            }

            if (this.rbtnCA01052Yes.Checked)
            {
                _CustomerBase.CA01052 = 1;
            }
            if (this.rbtnCA01052No.Checked)
            {
                _CustomerBase.CA01052 = 0;
            }
            _CustomerBase.CA01999 = Guid.NewGuid().ToString();
            int result = 0;

            try
            {
                result = _CustomerBLL.AddCustomerBase(_CustomerBase);//执行保存文件和保存用户基础资料的存储过程
            }
            catch (System.Exception Ex)
            {
                throw Ex;
            }

            //成功失败提示
            new Sinoo.Common.MessageShow().InsertMessage(this, result, "DataClear();");
        }