void txtMa_Sp_Validating(object sender, CancelEventArgs e) { string strValue = txtMa_Sp.Text.Trim(); bool bRequire = false; frmSanPham frmLookup = new frmSanPham(); DataRow drLookup = Lookup.ShowLookup(frmLookup, "LISANPHAM", "Ma_Sp", strValue, bRequire, ""); if (bRequire && drLookup == null) { e.Cancel = true; } if (drLookup == null) { lbtTen_Sp.Text = string.Empty; lbtTen_Sp.Text = string.Empty; } else { txtMa_Sp.Text = ((string)drLookup["Ma_Sp"]).Trim(); lbtTen_Sp.Text = ((string)drLookup["Ten_Sp"]).Trim(); } dicName.SetValue(lbtTen_Sp.Name, lbtTen_Sp.Text); if ((((txtTextLookup)sender).AutoFilter != null) && ((txtTextLookup)sender).AutoFilter.Visible) { ((txtTextLookup)sender).AutoFilter.Visible = false; this.SelectNextControl(this.ActiveControl, true, true, true, true); } }
private void quảnLíSảnPhẩmToolStripMenuItem_Click(object sender, EventArgs e) { frmSanPham sp = new frmSanPham(); sp.update = new frmSanPham.UpdateForm(LoadCamera); sp.ShowDialog(); }
private void mnuSanPham_Click(object sender, EventArgs e) { frmSanPham frmSP = new frmSanPham(); frmSP.ShowDialog(); if (frmSanPham.coHieu) { LoadLooKup(); } }
private void btnSP_Click(object sender, EventArgs e) { frmSanPham frmSP = new frmSanPham(); tbChiTiet.Show(); tbChiTiet.Controls.Clear(); frmSP.TopLevel = false; frmSP.Dock = DockStyle.Fill; tbChiTiet.Controls.Add(frmSP); frmSP.Show(); tabControlPanel1.Hide(); }
public static void Menu() { Console.OutputEncoding = Encoding.UTF8; do { Console.SetCursorPosition(40, 1); Console.WriteLine("CHƯƠNG TRÌNH QUẢN LÝ CỬA HÀNG MÔ HÌNH"); Console.SetCursorPosition(25, 6); Console.WriteLine("███████████████████████████████████████████████████████████████████████"); Console.SetCursorPosition(25, 7); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 8); Console.WriteLine("█░ MENU QUẢN LÝ ░█"); Console.SetCursorPosition(25, 9); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 10); Console.WriteLine("███████████████████████████████████████████████████████████████████████"); Console.SetCursorPosition(25, 11); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 12); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 13); Console.WriteLine("█░ F1. Quản lý danh sách sản phẩm . ░█"); Console.SetCursorPosition(25, 14); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 15); Console.WriteLine("█░ F2. Quản lý danh sách khách hàng. ░█"); Console.SetCursorPosition(25, 16); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 17); Console.WriteLine("█░ F3. Quản lý danh sách nhân viên. ░█"); Console.SetCursorPosition(25, 18); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 19); Console.WriteLine("█░ F4. Thoát. ░█"); Console.SetCursorPosition(25, 20); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 21); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 22); Console.WriteLine("█░ ░█"); Console.SetCursorPosition(25, 23); Console.WriteLine("███████████████████████████████████████████████████████████████████████"); Console.SetCursorPosition(56, 8); Console.WriteLine("MENU"); ConsoleKeyInfo kt = Console.ReadKey(); switch (kt.Key) { case ConsoleKey.F1: frmSanPham frm = new frmSanPham(); frm.Menu(); break; case ConsoleKey.F2: frmKhachHang frmkh = new frmKhachHang(); frmkh.Menu(); break; case ConsoleKey.F3: frmNhanVien frmnv = new frmNhanVien(); frmnv.Menu(); break; case ConsoleKey.F4: Environment.Exit(0); break; } } while (true); }
private void btnSanPham_ItemClick(object sender, ItemClickEventArgs e) { Form frm = CheckForm(typeof(frmSanPham)); if (frm != null) { frm.Activate(); } else { frmSanPham frmN = new frmSanPham(); frmN.MdiParent = this; frmN.Show(); } }
void txtMa_Sp_Validating(object sender, CancelEventArgs e) { string strValue = txtMa_Sp.Text.Trim(); bool bRequire = false; //Kiem tra whether tai khoan theo doi san pham object objTk_Sp = SQLExec.ExecuteReturnValue( "SELECT TOP 1 Tk_Sp FROM LITAIKHOAN " + "WHERE Tk LIKE ('" + txtTk_No.Text + "%') OR Tk LIKE ('" + txtTk_Co.Text + "%')" + "ORDER BY Tk_Sp DESC"); if (objTk_Sp != null && (bool)objTk_Sp) { bRequire = (bool)objTk_Sp; } frmSanPham frmLookup = new frmSanPham(); DataRow drLookup = Lookup.ShowLookup(frmLookup, "LISANPHAM", "Ma_Sp", strValue, bRequire, ""); if (bRequire && drLookup == null) { e.Cancel = true; } if (drLookup == null) { lbtTen_Sp.Text = string.Empty; lbtTen_Sp.Text = string.Empty; } else { txtMa_Sp.Text = ((string)drLookup["Ma_Sp"]).Trim(); lbtTen_Sp.Text = ((string)drLookup["Ten_Sp"]).Trim(); } dicName.SetValue(lbtTen_Sp.Name, lbtTen_Sp.Text); if ((((txtTextLookup)sender).AutoFilter != null) && ((txtTextLookup)sender).AutoFilter.Visible) { ((txtTextLookup)sender).AutoFilter.Visible = false; this.SelectNextControl(this.ActiveControl, true, true, true, true); } }
private void btnSanPham_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmSanPham frm = new frmSanPham(); OpenForm(frm, tabControl); }
private void simpleButton1_Click(object sender, EventArgs e) { frmSanPham frm = new frmSanPham(); frm.ShowDialog(); }