Exemple #1
0
        public int DeleteLoaiCongViec(LoaiCongViec loaicongviec)
        {
            List <SqlParameter> paras = new List <SqlParameter>();

            paras.Add(new SqlParameter("@maloaicongviec", loaicongviec.MaLoaiCV));
            return(p.ExecNonQuery("", CommandType.StoredProcedure, paras));
        }
Exemple #2
0
 public static LoaiCongViecDTO FromEntity(LoaiCongViec item)
 {
     return(new LoaiCongViecDTO()
     {
         Id = item.Id,
         TenLoaiCongViec = item.TenLoaiCongViec,
         CongViec = item.CongViec?.Select(CongViecDTO.FromEntity),
     });
 }
Exemple #3
0
        public int UpdateLoaiCongViec(LoaiCongViec loaicongviec)
        {
            List <SqlParameter> paras = new List <SqlParameter>();

            paras.Add(new SqlParameter("@maloaicongviec", loaicongviec.MaLoaiCV));
            try
            {
                return(p.ExecNonQuery("", CommandType.StoredProcedure, paras));
            }
            catch (SqlException p)
            {
                throw p;
            }
        }
Exemple #4
0
 public async Task UpdateLoaiCongViec(LoaiCongViec loaiCongViec)
 {
     await _loaiCongViecRepository.UpdateAsync(loaiCongViec);
 }
Exemple #5
0
 public async Task CreateLoaiCongViec(LoaiCongViec loaiCongViec)
 {
     await _loaiCongViecRepository.AddAsync(loaiCongViec);
 }