public WindowPhieuThuChi(Data.Transit transit, Data.BOThuChi bOThuChi, int loaiThuChiID)
 {
     InitializeComponent();
     mTransit = transit;
     LoaiThuChiID = loaiThuChiID;
     BOThuChi = bOThuChi;
 }
Beispiel #2
0
 public WindowPhieuThuChi(Data.Transit transit, Data.BOThuChi bOThuChi, int loaiThuChiID)
 {
     InitializeComponent();
     mTransit     = transit;
     LoaiThuChiID = loaiThuChiID;
     BOThuChi     = bOThuChi;
 }
 public UCThuChi(Data.Transit transit)
 {
     InitializeComponent();
     mTransit = transit;
     mProcessPrinter = new PrinterServer.ProcessPrinter(mTransit);
     BOThuChi = new Data.BOThuChi(transit);
     PhanQuyen();
 }
 public UCThuChi(Data.Transit transit)
 {
     InitializeComponent();
     mTransit        = transit;
     mProcessPrinter = new PrinterServer.ProcessPrinter(mTransit);
     BOThuChi        = new Data.BOThuChi(transit);
     PhanQuyen();
 }
 private void btnSua_Click(object sender, RoutedEventArgs e)
 {
     if (lvData.SelectedItems.Count > 0)
     {
         Data.BOThuChi item = (Data.BOThuChi)lvData.SelectedItems[0];
         UserControlLibrary.WindowPhieuThuChi win = new UserControlLibrary.WindowPhieuThuChi(mTransit, BOThuChi, (int)item.ThuChi.LoaiThuChiID);
         win._Item = item;
         if (win.ShowDialog() == true)
         {
             lvData.Items.Refresh();
         }
     }
 }
 private void btnXoa_Click(object sender, RoutedEventArgs e)
 {
     if (lvData.SelectedItems.Count > 0)
     {
         if (lvData.SelectedItems.Count > 0)
         {
             Data.BOThuChi item = (Data.BOThuChi)lvData.SelectedItems[0];
             if (item.ThuChi.LoaiThuChiID > 0)
             {
                 item.ThuChi.Deleted = true;
             }
             lsArray.Remove(item);
             lvData.Items.Refresh();
         }
     }
 }
 private void btnLuu_Click(object sender, RoutedEventArgs e)
 {
     if (CheckValues())
     {
         if (_Item == null)
         {
             _Item = new Data.BOThuChi();
             _Item.ThuChi.Visual = true;
             _Item.ThuChi.Deleted = false;
             _Item.ThuChi.Edit = false;
             _Item.ThuChi.NhanVienID = mTransit.NhanVien.NhanVienID;
             _Item.ThuChi.NgayChungTu = dtpNgayChungTu.SelectedDate;
             _Item.ThuChi.NgayGhiSo = dtpNgayGhiSo.SelectedDate;
             _Item.ThuChi.LoaiThuChiID = LoaiThuChiID;
             _Item.NhanVien.TenNhanVien = mTransit.NhanVien.TenNhanVien;
             _Item.LoaiThuChi.TenLoaiThuChi = BOThuChi.GetLoaiThuChi(LoaiThuChiID).TenLoaiThuChi;
         }
         GetValues();
         BOThuChi.Luu(_Item);
         DialogResult = true;
     }
 }
Beispiel #8
0
 private void btnLuu_Click(object sender, RoutedEventArgs e)
 {
     if (CheckValues())
     {
         if (_Item == null)
         {
             _Item = new Data.BOThuChi();
             _Item.ThuChi.Visual            = true;
             _Item.ThuChi.Deleted           = false;
             _Item.ThuChi.Edit              = false;
             _Item.ThuChi.NhanVienID        = mTransit.NhanVien.NhanVienID;
             _Item.ThuChi.NgayChungTu       = dtpNgayChungTu.SelectedDate;
             _Item.ThuChi.NgayGhiSo         = dtpNgayGhiSo.SelectedDate;
             _Item.ThuChi.LoaiThuChiID      = LoaiThuChiID;
             _Item.NhanVien.TenNhanVien     = mTransit.NhanVien.TenNhanVien;
             _Item.LoaiThuChi.TenLoaiThuChi = BOThuChi.GetLoaiThuChi(LoaiThuChiID).TenLoaiThuChi;
         }
         GetValues();
         BOThuChi.Luu(_Item);
         DialogResult = true;
     }
 }
 private void LoadData()
 {            
     mBOThuChi = mBOXuliMayIn.GetThuChi(mThuChiID);
     mListChiTiet = mBOXuliMayIn.GetChiTietThuChi(mThuChiID).ToList();
 }
 private void LoadData()
 {
     mBOThuChi    = mBOXuliMayIn.GetThuChi(mThuChiID);
     mListChiTiet = mBOXuliMayIn.GetChiTietThuChi(mThuChiID).ToList();
 }