public static string UpdateData(Data.KaraokeEntities kara, IQueryable <TEntity> query, System.Data.Objects.ObjectSet <TEntity> obj, TEntity data) { string resuilt = ""; try { TEntity entity = query.FirstOrDefault(); if (entity == null) { entity = data; obj.AddObject(entity); } else { ObjectConvert <TEntity> .Coppy(data, entity); //kara.ObjectStateManager.ChangeObjectState(entity, System.Data.EntityState.Modified); } kara.SaveChanges(); } catch (Exception ex) { resuilt = "Lỗi..." + ex.Message; } return(resuilt); }
public PriceManager(Data.Transit transit,Data.KaraokeEntities kara) { mTransit = transit; mKaraokeEntities=kara; mQueryMenuLoaiGia = Data.BOMenuLoaiGia.GetAllLoaiGiaRun(mKaraokeEntities, mTransit.Ban); mListMenuGia = new List<Data.BOMenuGia>(); }
public WindowChuyenKho(Data.Transit transit, Data.BOChuyenKho chuyenKho, Data.KaraokeEntities kara) { InitializeComponent(); mTransit = transit; mKaraokeEntities = kara; mBOChuyenKho = chuyenKho; }
public WindowChuyenKho(Data.Transit transit,Data.BOChuyenKho chuyenKho,Data.KaraokeEntities kara) { InitializeComponent(); mTransit = transit; mKaraokeEntities = kara; mBOChuyenKho = chuyenKho; }
public UCNhapKho(Data.Transit transit) { InitializeComponent(); mTransit = transit; mKaraokeEntities = new Data.KaraokeEntities(); dtpThoiGian.SelectedDate = DateTime.Now; }
private void Window_Loaded(object sender, RoutedEventArgs e) { mKaraokeEntities = new Data.KaraokeEntities(); datePicker1.SelectedDate = DateTime.Now; mProcessPrinter = new PrinterServer.ProcessPrinter(mTransit); LoadData(); }
public PriceManager(Data.Transit transit, Data.KaraokeEntities kara) { mTransit = transit; mKaraokeEntities = kara; mQueryMenuLoaiGia = Data.BOMenuLoaiGia.GetAllLoaiGiaRun(mKaraokeEntities, mTransit.Ban); mListMenuGia = new List <Data.BOMenuGia>(); }
public WindowNhapKho(Data.Transit transit) { InitializeComponent(); mKaraokeEntities = new Data.KaraokeEntities(); mBONhapKho = new Data.BONhapKho(mKaraokeEntities); mTransit = transit; lsLoaiBan = Data.BOLoaiBan.GetAllNoTracking(mTransit).ToList(); LoadDanhSach(); }
public UCChuyenKho(Data.Transit transit) { InitializeComponent(); mTransit = transit; mKaraokeEntities = new Data.KaraokeEntities(); mBOChuyenKho = new Data.BOChuyenKho(mTransit,mKaraokeEntities); mBOChuyenKho.NhanVienID = mTransit.NhanVien.NhanVienID; dtpThoiGian.SelectedDate = DateTime.Now; }
public UCChuyenKho(Data.Transit transit) { InitializeComponent(); mTransit = transit; mKaraokeEntities = new Data.KaraokeEntities(); mBOChuyenKho = new Data.BOChuyenKho(mTransit, mKaraokeEntities); mBOChuyenKho.NhanVienID = mTransit.NhanVien.NhanVienID; dtpThoiGian.SelectedDate = DateTime.Now; }
public ProcessOrder(Data.Transit transit) { mTransit = transit; mKaraokeEntities = new Data.KaraokeEntities(); mPriceManager = new PriceManager(mTransit,mKaraokeEntities); mBOMenuGia = new Data.BOMenuGia(mTransit); mBanHang = new Data.BOBanHang(mTransit,mKaraokeEntities); //mBOQuanLyKho = new Data.BOQuanLyKho(mTransit); mBanHang.LoadBanHang(); mProcessPrinter = new PrinterServer.ProcessPrinter(mTransit); }
public ProcessOrder(Data.Transit transit) { mTransit = transit; mKaraokeEntities = new Data.KaraokeEntities(); mPriceManager = new PriceManager(mTransit, mKaraokeEntities); mBOMenuGia = new Data.BOMenuGia(mTransit); mBanHang = new Data.BOBanHang(mTransit, mKaraokeEntities); //mBOQuanLyKho = new Data.BOQuanLyKho(mTransit); mBanHang.LoadBanHang(); mProcessPrinter = new PrinterServer.ProcessPrinter(mTransit); }
public UCGiamGiaNhom() { InitializeComponent(); mKaraokeEntities = new Data.KaraokeEntities(); }
public ImportExportProcess() { mKaraokeEntities = new Data.KaraokeEntities(); }