GetModel() public method

得到一个对象实体
public GetModel ( System.Guid GUID ) : CustomerService.Model.Customer
GUID System.Guid
return CustomerService.Model.Customer
示例#1
0
        private void GetCustomerGroupAndSelected(Guid guid)
        {
            //获得所属客户组
            BLL.Customer      bllCustomer = new BLL.Customer();
            BLL.CustomerGroup bllGroup    = new BLL.CustomerGroup();

            Model.Customer modelCustomer = new Model.Customer();
            modelCustomer = bllCustomer.GetModel(guid);

            List <string> lst = new List <string>();

            bllGroup.GetSelected(ref lst, modelCustomer.parentGUID);

            StringBuilder sb = new StringBuilder();

            for (int i = lst.Count - 1; i > 0; i--)
            {
                sb.Append(lst[i]);
                sb.Append(this.cbxCustomerGroup.BranchSeparator);
            }

            sb.Append(lst[0]);

            this.cbxCustomerGroup.Text         = sb.ToString();
            this.cbxCustomerGroup.SelectedNode =
                (this.cbxCustomerGroup.Nodes.Find(
                     modelCustomer.parentGUID.ToString(), true))[0];

            cbxCustomerGroup_Leave(null, null);

            cbxName.SelectedValue = guid.ToString();
        }
示例#2
0
        /// <summary>
        /// 或许所属客户组
        /// </summary>
        /// <param name="guid"></param>
        private void GetCustomerGroup(Guid guid)
        {
            BLL.CustomerGroup bll = new BLL.CustomerGroup();
            List<string> lst = new List<string>();
            BLL.Customer bllCustomer = new BLL.Customer();
            Model.Customer modelCustomer = bllCustomer.GetModel(guid);

            bll.GetSelected(ref lst, modelCustomer.parentGUID);

            StringBuilder sb = new StringBuilder();

            for (int i = lst.Count - 1; i > 0; i--)
            {
                sb.Append(lst[i]);
                sb.Append(this.cbxCustomerGroup.BranchSeparator);
            }

            sb.Append(lst[0]);

            this.cbxCustomerGroup.Text = sb.ToString();
            this.cbxCustomerGroup.SelectedNode = (this.cbxCustomerGroup.Nodes.Find(modelCustomer.parentGUID.ToString(), true))[0];
        }
示例#3
0
        /// <summary>
        /// 或许所属客户组
        /// </summary>
        /// <param name="guid"></param>
        private void GetCustomerGroup(Guid guid)
        {
            BLL.CustomerGroup bll = new BLL.CustomerGroup();
            List <string>     lst = new List <string>();

            BLL.Customer   bllCustomer   = new BLL.Customer();
            Model.Customer modelCustomer = bllCustomer.GetModel(guid);

            bll.GetSelected(ref lst, modelCustomer.parentGUID);

            StringBuilder sb = new StringBuilder();

            for (int i = lst.Count - 1; i > 0; i--)
            {
                sb.Append(lst[i]);
                sb.Append(this.cbxCustomerGroup.BranchSeparator);
            }

            sb.Append(lst[0]);

            this.cbxCustomerGroup.Text         = sb.ToString();
            this.cbxCustomerGroup.SelectedNode = (this.cbxCustomerGroup.Nodes.Find(modelCustomer.parentGUID.ToString(), true))[0];
        }
示例#4
0
        /// <summary>
        /// 修改信息初始化
        /// </summary>
        private void GetUpdate()
        {
            this.Text = "编辑客户信息";
            BLL.Customer   bll   = new BLL.Customer();
            Model.Customer model = bll.GetModel(_model.GUID);
            this.llblAddService.Visible = true;
            this.llblService.Visible    = true;

            //赋值
            BLL.Argument bllArgument = new BLL.Argument();
            DataTable    dt          = bllArgument.GetList("type = '客户编号'").Tables[0];

            string str = dt.Rows[0][1].ToString();

            txtNO.Text   = str + model.cNO;
            txtName.Text = model.cName;

            //获得所属客户组
            BLL.CustomerGroup bllGroup = new BLL.CustomerGroup();
            List <string>     lst      = new List <string>();

            bllGroup.GetSelected(ref lst, model.parentGUID);

            StringBuilder sb = new StringBuilder();

            for (int i = lst.Count - 1; i > 0; i--)
            {
                sb.Append(lst[i]);
                sb.Append(this.cbxCustomerGroup.BranchSeparator);
            }

            sb.Append(lst[0]);

            this.cbxCustomerGroup.Text         = sb.ToString();
            this.cbxCustomerGroup.SelectedNode =
                (this.cbxCustomerGroup.Nodes.Find(
                     model.parentGUID.ToString(), true))[0];

            cbxIsGov.SelectedIndex = Convert.ToInt32(!model.isGov);
            txtTrade.Text          = model.trade;
            txtMan.Text            = model.cMan;
            txtTel.Text            = model.Tel;
            txtFax.Text            = model.fax;
            txtEmail.Text          = model.email;
            cbxProvince.Text       = model.province;
            cbxCity.Text           = model.city;
            cbxDistrict.Text       = model.district;
            txtQQ.Text             = model.QQ;
            txtMode.Text           = model.mode;
            txtScope.Text          = model.scope;
            txtProduct.Text        = model.product;
            txtAddress.Text        = model.addresss;
            cbxStage.Text          = model.cStage;
            cbxType.Text           = model.cType;
            cbxLevel.Text          = model.cLevel;
            cbxStatus.Text         = model.cStatus;
            txtLink1.Text          = model.link1;
            txtTel1.Text           = model.tel1;
            txtLink2.Text          = model.link2;
            txtTel2.Text           = model.tel2;
        }
示例#5
0
        private void GetCustomerGroupAndSelected(Guid guid)
        {
            //获得所属客户组
            BLL.Customer bllCustomer = new BLL.Customer();
            BLL.CustomerGroup bllGroup = new BLL.CustomerGroup();

            Model.Customer modelCustomer = new Model.Customer();
            modelCustomer = bllCustomer.GetModel(guid);

            List<string> lst = new List<string>();
            bllGroup.GetSelected(ref lst, modelCustomer.parentGUID);

            StringBuilder sb = new StringBuilder();

            for (int i = lst.Count - 1; i > 0; i--)
            {
                sb.Append(lst[i]);
                sb.Append(this.cbxCustomerGroup.BranchSeparator);
            }

            sb.Append(lst[0]);

            this.cbxCustomerGroup.Text = sb.ToString();
            this.cbxCustomerGroup.SelectedNode =
                (this.cbxCustomerGroup.Nodes.Find(
                modelCustomer.parentGUID.ToString(), true))[0];

            cbxCustomerGroup_Leave(null, null);

            cbxName.SelectedValue = guid.ToString();
        }
示例#6
0
文件: frmCustomer.cs 项目: NanQi/demo
        /// <summary>
        /// 修改信息初始化
        /// </summary>
        private void GetUpdate()
        {
            this.Text = "编辑客户信息";
            BLL.Customer bll = new BLL.Customer();
            Model.Customer model = bll.GetModel(_model.GUID);
            this.llblAddService.Visible = true;
            this.llblService.Visible = true;

            //赋值
            BLL.Argument bllArgument = new BLL.Argument();
            DataTable dt = bllArgument.GetList("type = '客户编号'").Tables[0];

            string str = dt.Rows[0][1].ToString();

            txtNO.Text = str + model.cNO;
            txtName.Text = model.cName;

            //获得所属客户组
            BLL.CustomerGroup bllGroup = new BLL.CustomerGroup();
            List<string> lst = new List<string>();
            bllGroup.GetSelected(ref lst, model.parentGUID);

            StringBuilder sb = new StringBuilder();

            for (int i = lst.Count - 1; i > 0; i--)
            {
                sb.Append(lst[i]);
                sb.Append(this.cbxCustomerGroup.BranchSeparator);
            }

            sb.Append(lst[0]);

            this.cbxCustomerGroup.Text = sb.ToString();
            this.cbxCustomerGroup.SelectedNode = 
                (this.cbxCustomerGroup.Nodes.Find(
                model.parentGUID.ToString(), true))[0];

            cbxIsGov.SelectedIndex = Convert.ToInt32(!model.isGov);
            txtTrade.Text = model.trade;
            txtMan.Text = model.cMan;
            txtTel.Text = model.Tel;
            txtFax.Text = model.fax;
            txtEmail.Text = model.email;
            cbxProvince.Text = model.province;
            cbxCity.Text = model.city;
            cbxDistrict.Text = model.district;
            txtQQ.Text = model.QQ;
            txtMode.Text = model.mode;
            txtScope.Text = model.scope;
            txtProduct.Text = model.product;
            txtAddress.Text = model.addresss;
            cbxStage.Text = model.cStage;
            cbxType.Text = model.cType;
            cbxLevel.Text = model.cLevel;
            cbxStatus.Text = model.cStatus;
            txtLink1.Text = model.link1;
            txtTel1.Text = model.tel1;
            txtLink2.Text = model.link2;
            txtTel2.Text = model.tel2;
        }