public ucTraCuuMatHang() { InitializeComponent(); _MatHangBUS = new MatHangBUS(); _HinhAnhBUS = new HinhAnhBUS(); _CauHinhDienThoaiBUS = new CauHinhDienThoaiBUS(); //ComboBox NhaSanXuat DataTable table1 = (new NhaSanXuatBUS().LoadComBoBox()); this.lueNhaSX.Properties.DataSource = table1; this.lueNhaSX.Properties.DisplayMember = "TenNSX"; this.lueNhaSX.Properties.ValueMember = "MaNSX"; this.lueNhaSX.Properties.NullText = "Chọn Nhà Sản Xuất"; this.lueNhaSX.Properties.Columns.Add( new DevExpress.XtraEditors.Controls.LookUpColumnInfo() { FieldName = "TenNSX" }); //ConboBox LoaiMatHang DataTable table = (new LoaiMatHangBUS().LoadComBoBox()); this.lueLoaiSanPham.Properties.DataSource = table; this.lueLoaiSanPham.Properties.DisplayMember = "TenLoaiMatHang"; this.lueLoaiSanPham.Properties.ValueMember = "MaLoaiMatHang"; this.lueLoaiSanPham.Properties.NullText = "Chọn Loại Mặt Hàng"; this.lueLoaiSanPham.Properties.Columns.Add( new DevExpress.XtraEditors.Controls.LookUpColumnInfo() { FieldName = "TenLoaiMatHang" }); //timKiem(); }
public ucHoaDonNhapHang() { InitializeComponent(); _HoaDonNhapHang = new HoaDonNhapHangBUS(); _HoaDonDatHang = new HoaDonDatHangBUS(); _NhaCungCapBUS = new NhaCungCapBUS(); _ChiTietHoaDonDatHangBUS = new ChiTietHoaDonDatHangBUS(); _MatHangBUS = new MatHangBUS(); tongtien = 0; }
public ucDonGia() { InitializeComponent(); _DonGiaBUS = new DonGiaBUS(); _MatHangBUS = new MatHangBUS(); _NhaCungCapBUS = new NhaCungCapBUS(); //Lấy ds mau sac LoadData(); }
public ucThemSanPham() { InitializeComponent(); this.groupCauHinhDienThoai.Enabled = true; this.matHangBUS = new MatHangBUS(); LoadData(); //Max length of type text this.teTenSanPham.Properties.MaxLength = 100; // this.teSoLuongTon.Properties.MaxLength = 5; this.teThoiGianBaoHanh.Properties.MaxLength = 5; this.memGhiChu.Properties.MaxLength = 200; this.memGhiChuNCC.Properties.MaxLength = 200; this.memMoTa.Properties.MaxLength = 1000; this.teKichThuocManHinh.Properties.MaxLength = 4; this.teHeDieuHanh.Properties.MaxLength = 50; this.teRam.Properties.MaxLength = 5; this.tePIN.Properties.MaxLength = 5; this.teBoNho.Properties.MaxLength = 5; this.teSim.Properties.MaxLength = 5; // Only type number // this.teSoLuongTon.Properties.Mask.EditMask = "n0"; // this.teSoLuongTon.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.teKichThuocManHinh.Properties.Mask.EditMask = "n1"; this.teKichThuocManHinh.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.teRam.Properties.Mask.EditMask = "n0"; this.teRam.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.tePIN.Properties.Mask.EditMask = "n0"; this.tePIN.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.teBoNho.Properties.Mask.EditMask = "n0"; this.teBoNho.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.teSim.Properties.Mask.EditMask = "n0"; this.teSim.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.teThoiGianBaoHanh.Properties.Mask.EditMask = "n0"; this.teThoiGianBaoHanh.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.teGiaNhap.Properties.Mask.EditMask = "n0"; this.teGiaNhap.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; this.teGiaXuat.Properties.Mask.EditMask = "n0"; this.teGiaXuat.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; //this.peHinhAnh.Image = Image.FromFile("resource/defaultavatar.png"); }
public ucHoaDonDatHang() { InitializeComponent(); _NhaCungCapBUS = new NhaCungCapBUS(); _MatHangBUS = new MatHangBUS(); _HoaDonDatHangBUS = new HoaDonDatHangBUS(); _ChiTietHoaDonDatHangBUS = new ChiTietHoaDonDatHangBUS(); _ThamSoBUS = new ThamSoBUS(); ThamSo ts =new ThamSo(); ts.TenThamSo = "SoSanPhamTonToiDaDeDatHang"; QuyDinhSoSanPhamToiThieu = (int)Convert.ToDecimal(_ThamSoBUS.LayGiaTriThamSo(ts)); leftselection = -1; rightselection = -1; tongtien = 0; TenNhanVienLap = StaticVariables.nhanVien.TenNhanVien; }
private void sbTimKiem_Click(object sender, EventArgs e) { if (this.rdbDsSanPham.Checked == true) { MatHang matHang = new MatHang(); matHang.TenMatHang = this.teTenSanPham.Text; DataTable data = new DataTable(); data = new MatHangBUS().TimKiemMatHangBan(matHang, 0, "", "", 0, 0, 0, 0, ""); gridViewSp.FocusedRowHandle = 0; this.girdSanPham.DataSource = data; } else { CTKHuyenMai km = new CTKHuyenMai(); km.MatHang.TenMatHang = this.teTenSanPham.Text; km.KhuyenMai.ThoiGianKT = DateTime.Now.ToString("dd/MM/yyyy"); DataTable data = new DataTable(); data = new KhuyenMaiBUS().TimKiemChiTietCTKhuyenMai(km); gridViewSp.FocusedRowHandle = 0; this.girdSanPham.DataSource = data; } }