Example #1
0
        public void LapPhieuChuyenKho(GD_CHUYEN_KHO phieu_chuyen_kho, long id_hang, long id_kho_chuyen)
        {
            using(var uow = new UnitOfWork())
            {
                uow.Repository<GD_CHUYEN_KHO>().Insert(phieu_chuyen_kho);

                var entity = uow.Repository<GD_HANG>().GetByID(id_hang);

                entity.ID_KHO = id_kho_chuyen;
                uow.Repository<GD_HANG>().Update(entity);

                uow.Save();
            }
        }
 private void lap_phieu()
 {
     GD_CHUYEN_KHO phieu_chuyen_kho = new GD_CHUYEN_KHO()
     {
         SO_CHUNG_TU = m_txt_so_phieu.Text,
         NGAY_CHUNG_TU = m_dat_ngay_chung_tu.DateTime,
         ID_NHAN_VIEN_LIEN_QUAN = (long)m_sle_nhan_vien.EditValue,
         NGAY_NHAP_PHAN_MEM = DateTime.Now.Date,
         ID_KHO_TO = (long) m_sle_chuyen_toi_kho.EditValue,
         BARCODE = m_txt_barcode.Text
     };
     //BS_MAT_HANG.Instance.LapPhieuChuyenKho();
 }