public HttpResponseMessage CreateAccountAnalysisModeLookUp(AccountAnalysisLookUpModel _AccountAnalysisLookUpModel) { try { ACCOUNT_ANALYSIS_LOOKUP aalu = new ACCOUNT_ANALYSIS_LOOKUP(); aalu.ACC_ANALYSIS_ID = _AccountAnalysisLookUpModel.ACCOUNT_ANALYSIS_ID; aalu.ACC_ANALYSIS_DESC = _AccountAnalysisLookUpModel.ACCOUNT_ANALYSIS_DESC; aalu.TYPE = _AccountAnalysisLookUpModel.TYPE; db.ACCOUNT_ANALYSIS_LOOKUP.Add(aalu); db.SaveChanges(); } catch { throw; } return(Request.CreateResponse(HttpStatusCode.OK, "success")); }
public HttpResponseMessage UpdateAccountAnalysisModeLookUp(AccountAnalysisLookUpModel _AccountAnalysisLookUpModel) { try { ACCOUNT_ANALYSIS_LOOKUP aalu = new ACCOUNT_ANALYSIS_LOOKUP(); aalu.ACC_ANALYSIS_ID = _AccountAnalysisLookUpModel.ACCOUNT_ANALYSIS_ID; aalu.ACC_ANALYSIS_DESC = _AccountAnalysisLookUpModel.ACCOUNT_ANALYSIS_DESC; aalu.TYPE = _AccountAnalysisLookUpModel.TYPE; db.ACCOUNT_ANALYSIS_LOOKUP.Attach(aalu); db.Entry(aalu).State = System.Data.EntityState.Modified; db.SaveChanges(); } catch { throw; } return(Request.CreateResponse(HttpStatusCode.OK, "success")); }