コード例 #1
0
        public CustomerForm(int id, User user)
        {
            InitializeComponent();
            InitForm(user);

            textFullName.Focus();
            itemId = id;

            var biz = new CustomerBiz();
            var item = biz.LoadItem(id);

            textFullName.Text = item.FullName;
            textAddress1.Text = item.Address1;
            textAddress2.Text = item.Address2;
            textPostalCode.Text = item.PostalCode;
            textTel.Text = item.Tel;
            textMobile1.Text = item.Mobile1;
            textMobile2.Text = item.Mobile2;
            textEmail1.Text = item.Email1;
            textEmail2.Text = item.Email2;
            drlSegment.SelectedItem = item.Segment;
            txtCompany.Text = item.Company;
            textMst.Text = item.Mst;

            textTenSms.Text = item.SMS;

            if (item.Delivery.HasValue)
            {
                numberDelivery.Text = Convert.ToString(item.Delivery.Value);
            }
            textOtherInformation.Text = item.OtherInformation;

            foreach(string city in drlCity.Items)
            {
                if(string.Equals(city, item.City, StringComparison.InvariantCultureIgnoreCase))
                {
                    drlCity.SelectedItem = city;
                    break;
                }
            }

            created = item.Created;
            createdBy = item.CreatedByUserId;
            modified = item.Modified;
            modifiedBy = item.ModifiedByUserId;

            buttonViewOrder.Visible = true;

            this.Text = "Sửa khách hàng";
        }
コード例 #2
0
        public CustomerForm(int id, User user)
        {
            InitializeComponent();
            InitForm(user);

            textFullName.Focus();
            itemId = id;

            var biz  = new CustomerBiz();
            var item = biz.LoadItem(id);

            textFullName.Text       = item.FullName;
            textAddress1.Text       = item.Address1;
            textAddress2.Text       = item.Address2;
            textPostalCode.Text     = item.PostalCode;
            textTel.Text            = item.Tel;
            textMobile1.Text        = item.Mobile1;
            textMobile2.Text        = item.Mobile2;
            textEmail1.Text         = item.Email1;
            textEmail2.Text         = item.Email2;
            drlSegment.SelectedItem = item.Segment;
            txtCompany.Text         = item.Company;
            textMst.Text            = item.Mst;

            textTenSms.Text = item.SMS;

            if (item.Delivery.HasValue)
            {
                numberDelivery.Text = Convert.ToString(item.Delivery.Value);
            }
            textOtherInformation.Text = item.OtherInformation;

            foreach (string city in drlCity.Items)
            {
                if (string.Equals(city, item.City, StringComparison.InvariantCultureIgnoreCase))
                {
                    drlCity.SelectedItem = city;
                    break;
                }
            }

            created    = item.Created;
            createdBy  = item.CreatedByUserId;
            modified   = item.Modified;
            modifiedBy = item.ModifiedByUserId;

            buttonViewOrder.Visible = true;

            this.Text = "Sửa khách hàng";
        }