private void ChiTietHd_Load(object sender, EventArgs e) { //listHd = new List<HOADON>(); //listCt = new BindingList<CTHD>(); //changedItem = new List<CTHD>(); //deletedItem = new List<CTHD>(); //tbl_CtHd.DataSource = listCt; //tbl_CtHd.Columns[4].Visible = false; //tbl_CtHd.Columns[5].Visible = false; //tbl_CtHd.Columns[0].ReadOnly = true; //tbl_CtHd.Columns[1].ReadOnly = true; //tbl_CtHd.Columns[2].ReadOnly = false; //tbl_CtHd.Columns[3].ReadOnly = true; int m = DateTime.Now.Month; int yy = DateTime.Now.Year; dtp_from.Value = DateTime.Parse(string.Format("{0}/1/{1}", m, yy)); dtp_to.Value = DateTime.Now; load_DsHD_From_To(sender, e); if (nvbus.NhanVienByID(manv).MACV != "AD") { bt_Sua.Hide(); bt_Xoa.Hide(); } if (BaoCaoDs.clickstatus) { loadhdFromBCDS(BaoCaoDs.ngaychon); } }
private void ThongTinNv_Load(object sender, EventArgs e) { int id; string name = UserName_infor; AccountBus acbus = new AccountBus(); ACCOUNT ac = new ACCOUNT(); ac = acbus.ACCOUNTByName(name); id = ac.ID; NhanVienBus nvbus = new NhanVienBus(); NHANVIEN nv = new NHANVIEN(); nv = nvbus.NhanVienByID(id); txt_manv.Text = nv.MANV.ToString(); if (nv.PHAI == "Nam") { rd_nam.Checked = true; rd_nu.Enabled = false; } else { rd_nu.Checked = true; rd_nam.Enabled = false; } txt_CMND.Text = nv.CMT; txt_DiaChi.Text = nv.QUEQUAN; txt_hoten.Text = nv.TENNV; txt_NgayLam.Text = nv.NGAYVAOLAM.ToString(); DateTime d = Convert.ToDateTime(txt_NgayLam.Text); txt_NgayLam.Text = d.ToString("MM/dd/yyyy"); txt_ngaysinh.Text = nv.NGAYSINH.ToString(); DateTime dm = Convert.ToDateTime(txt_ngaysinh.Text); txt_ngaysinh.Text = dm.ToString("MM/dd/yyyy"); txt_Sdt.Text = nv.SDT; txt_user.Text = ac.USERNAME; Show_Hide(false); }
private void ThongKeKho_Load(object sender, EventArgs e) { DoChoiBus dcBus = new DoChoiBus(); listDc = new List <DOCHOI>(); listDc = dcBus.dsDoChoi(); tbl_DsDc.DataSource = listDc; tbl_DsDc.Refresh(); tbl_DsDc.ClearSelection(); tb_TenDC.Clear(); tb_Loai.Clear(); tb_NuocSX.Clear(); tb_Gia.Clear(); tb_SL.Clear(); if (nvbs.NhanVienByID(manv).MACV != "AD") { btn_Sua.Hide(); btn_Xoa.Hide(); } }
private void MainMenu_Load(object sender, EventArgs e) { QuanLiBanHang.Size = new Size(645, 491); QuanLiBanHang.Location = new Point(202, 26); bt_BanHang.BackColor = Color.FromArgb(26, 188, 156); //mau button khi nhap vao // chỉ hiện panel chính { QuanLiKho.Hide(); BaoCaoDoanhSo.Hide(); QuanLiNhanVien.Hide(); pn_DangXuat.Hide(); pn_ThongBao.Hide(); } QuanLiBanHang.Show(); bt_Account.Text = UserName; ThongTinNv.UserName_infor = bt_Account.Text; int ma = ac.ACCOUNTByName(UserName).ID; if (nvbus.NhanVienByID(ma).MACV == "NVBH") { bt_QuanLiNhanVien.Hide(); } }