public ResponseResult SuaCongTacKhac(CongTacKhacModel model) { ResponseResult res = null; try { res = CongTacKhacDA.SuaCongTacKhac(model); } catch (Exception ex) { throw ex; } return(res); }
public CongTacKhacModel ChiTietCongTacKhac(int CongTacKhacID) { CongTacKhacModel model = null; try { model = CongTacKhacDA.ChiTietCongTacKhac(CongTacKhacID); } catch (Exception ex) { throw ex; } return(model); }
public ResponseResult ThemCongTacKhac(CongTacKhacModel model) { ResponseResult res = null; try { model.NguoiTao = AccountUtils.CurrentUsername(); res = CongTacKhacDA.ThemCongTacKhac(model); } catch (Exception ex) { throw ex; } return(res); }
public CongTacKhacModel ChiTietCongTacKhac(int CongTacKhacID) { CongTacKhacModel model = null; try { List <SqlParameter> listParameter = new List <SqlParameter>(); listParameter.Add(new SqlParameter("@CongTacKhacID", CongTacKhacID)); model = DBUtils.ExecuteSP <CongTacKhacModel>("SP_CongTacKhac_ChiTiet", listParameter); } catch (Exception ex) { throw ex; } return(model); }
public ResponseResult ThemCongTacKhac(CongTacKhacModel model) { ResponseResult res = null; try { List <SqlParameter> listParameter = new List <SqlParameter>(); listParameter.Add(new SqlParameter("@TenCongTac", model.TenCongTac)); listParameter.Add(new SqlParameter("@SoTiet", model.SoTiet)); listParameter.Add(new SqlParameter("@NguoiTao", model.NguoiTao)); res = DBUtils.ExecuteSP <ResponseResult>("SP_CongTacKhac_Them", listParameter); } catch (Exception ex) { throw ex; } return(res); }
public ActionResult SuaCongTacKhac(CongTacKhacModel model) { try { var result = CongTacKhacService.SuaCongTacKhac(model); if (result != null && result.ResponseCode == 1) { return(Json(JsonResponseViewModel.CreateSuccess("Cập nhật công tác khác thành công."))); } else if (result != null && result.ResponseCode == -1) { return(Json(JsonResponseViewModel.CreateFail(result.ResponseMessage))); } else { return(Json(JsonResponseViewModel.CreateFail("Cập nhật công tác khác thất bại."))); } } catch (Exception ex) { return(Json(JsonResponseViewModel.CreateFail(ex))); } }