private void FrmProductCategory_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); tbl_ProductCategory = db.tbl_LoaiHangHoas; LoadDatabaseToDataGridView(); //Binding txtName.DataBindings.Add("Text", tbl_ProductCategory, "Ten", true); listProductCategory = this.BindingContext[tbl_ProductCategory]; }
private void FrmProductCategory_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); tbl_ProductCategory = db.tbl_ProductCategories; LoadDatabaseToDataGridView(); // Interface NormalInterface = true; //Binding txtName.DataBindings.Add("Text", tbl_ProductCategory, "NameOfProductCategory"); listProductCategory = this.BindingContext[tbl_ProductCategory]; }
private void FrmManageAccountCustomercs_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); tbl_CustomerAccount = db.tbl_Customers; LoadDatabaseToDataGridView(); txtName.DataBindings.Add("Text", tbl_CustomerAccount, "NameOfCustomer", true); txtAddress.DataBindings.Add("Text", tbl_CustomerAccount, "AddressOfCustomer", true); txtEmail.DataBindings.Add("Text", tbl_CustomerAccount, "EmailOfCustomer", true); txtPhone.DataBindings.Add("Text", tbl_CustomerAccount, "TelOfCustomer", true); listCustomerAccount = this.BindingContext[tbl_CustomerAccount]; // Interface NormalInterface = true; }
private void FrmManageAccountAdmin_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); tbl_AdminAccount = db.tbl_TaiKhoans; LoadDataToCBOAuthorization(); LoadDatabaseToDataGridView(); // Interface NormalInterface = true; //Binding txtName.DataBindings.Add("Text", tbl_AdminAccount, "HoTen", true); txtUsername.DataBindings.Add("Text", tbl_AdminAccount, "TenDangNhap", true); txtPassword.DataBindings.Add("Text", tbl_AdminAccount, "MatKhau", true); txtPhone.DataBindings.Add("Text", tbl_AdminAccount, "Sdt", true); cboAuthorization.DataBindings.Add("Text", tbl_AdminAccount, "Quyen", true); listAdminAccount = this.BindingContext[tbl_AdminAccount]; }
private void frmPayment_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); tbl_Product = db.tbl_Products; tbl_Bill = db.tbl_Bills; LoadListProductDatabaseToDataGridView(); dt = new DataTable(); dt.Columns.Add("ProductID"); dt.Columns.Add("NameOfProduct"); dt.Columns.Add("NumberOfProduct"); dt.Columns.Add("PriceOfProduct"); dgvBill.DataSource = dt; loadBarCode(); }
private void FrmManageAccountAdmin_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); tbl_AdminAccount = db.tbl_Admins; LoadDataToCBOAuthorization(); LoadDatabaseToDataGridView(); // Interface NormalInterface = true; //Binding txtName.DataBindings.Add("Text", tbl_AdminAccount, "NameOfAdmin", true); txtUsername.DataBindings.Add("Text", tbl_AdminAccount, "UsernameOfAdmin", true); txtPassword.DataBindings.Add("Text", tbl_AdminAccount, "PasswordOfAdmin", true); txtPhone.DataBindings.Add("Text", tbl_AdminAccount, "TelOfAdmin", true); cboAuthorization.DataBindings.Add("Text", tbl_AdminAccount, "AuthorizationOfAdmin", true); listAdminAccount = this.BindingContext[tbl_AdminAccount]; }
private void FrmProduct_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); if (db.tbl_LoaiHangHoas.ToList().Count == 0) { DevExpress.XtraEditors.XtraMessageBox.Show("Không có loại sản phẩm trong CSDL", "Thông báo"); this.Close(); } LoadDatabaseToDataGridView(); tblLoaiHangHoaBindingSource.DataSource = db.tbl_LoaiHangHoas; //Binding txtName.DataBindings.Add("Text", tblHangHoaBindingSource, "Ten"); nupAmount.DataBindings.Add("Text", tblHangHoaBindingSource, "SoLuong"); txtPrice.DataBindings.Add("Text", tblHangHoaBindingSource, "GiaBan"); }
private void FrmLogin_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); }
private void frmMyAccount_Load(object sender, EventArgs e) { db = new DatabaseDataContext(); loadInformationOfMyAccount(); }