Exemple #1
0
        /// <summary>
        /// Ham xu ly chinh, chi nhan 1 bien moi truong
        /// </summary>
        /// <param name="context">Bien moi truong</param>
        /// <returns></returns>
        public async Task <Entity.MSSQL_QLDN_QLNS.Entity.PhieuCongTac> Execute()
        {
            Init();
            Validate();

            var obj = createObj();

            var repo   = new PhieuCongTacRepository(_context);
            var result = await repo.Insert(obj);

            return(result);
        }
Exemple #2
0
        /// <summary>
        /// Ham xu ly chinh, chi nhan 1 bien moi truong
        /// </summary>
        /// <param name="context">Bien moi truong</param>
        /// <returns></returns>
        public async Task <Entity.MSSQL_QLDN_QLNS.Entity.PhieuCongTac> Execute()
        {
            Init();
            Validate();

            var obj = createObj();

            var repo   = new PhieuCongTacRepository(_context);
            var result = await repo.UpdatePartial(obj
                                                  , nameof(Entity.MSSQL_QLDN_QLNS.Entity.PhieuCongTac.NoiDung)
                                                  , nameof(Entity.MSSQL_QLDN_QLNS.Entity.PhieuCongTac.NhanVienId)
                                                  , nameof(Entity.MSSQL_QLDN_QLNS.Entity.PhieuCongTac.NgayDi)
                                                  , nameof(Entity.MSSQL_QLDN_QLNS.Entity.PhieuCongTac.NgayVe)
                                                  , nameof(Entity.MSSQL_QLDN_QLNS.Entity.PhieuCongTac.SoNgay)
                                                  );

            return(result);
        }