Пример #1
0
 public frmListSupplier_Update(string code)
 {
     InitializeComponent();
     statusForm = false;//form o tinh trang update
     Class.clsListSupplier cls = new Class.clsListSupplier();
     cls.SupplierCode = code;
     DataTable dt = cls.tbSupplier_Get();
     if (dt.Rows.Count > 0) {
         txtSupplierCode.Enabled = false;
         txtSupplierCode.Text = dt.Rows[0]["SupplierCode"].ToString();
         txtSupplierName.Text = dt.Rows[0]["SupplierName"].ToString();
         txtAddress.Text = dt.Rows[0]["Address"].ToString();
         txtTelephone.Text = dt.Rows[0]["Telephone"].ToString();
         txtMail.Text = dt.Rows[0]["Mail"].ToString();
         txtGroup.Text = dt.Rows[0]["Group"].ToString();
         txtContact.Text = dt.Rows[0]["Contact"].ToString();
         txtNote.Text = dt.Rows[0]["Note"].ToString();
     }
     this.Text = "Cập nhật nhà cung cấp:  "+ dt.Rows[0]["SupplierName"].ToString();
 }