public StatusTypeParam(StatusTypeParamVM statusTypeParamVM) { this.StatusTypeName = statusTypeParamVM.StatusTypeName; this.StatusTypeValue = statusTypeParamVM.StatusTypeValue; this.StatusTypeModule = statusTypeParamVM.StatusTypeModule; this.CreateDate = DateTimeOffset.Now.ToLocalTime(); }
public void Update(int id, StatusTypeParamVM statusTypeParamVM) { this.Id = statusTypeParamVM.Id; this.StatusTypeName = statusTypeParamVM.StatusTypeName; this.StatusTypeValue = statusTypeParamVM.StatusTypeValue; this.StatusTypeModule = statusTypeParamVM.StatusTypeModule; this.CreateDate = DateTimeOffset.Now.ToLocalTime(); }
public bool Insert(StatusTypeParamVM statusTypeParamVM) { var pust = new StatusTypeParam(statusTypeParamVM); myContext.statusTypeParams.Add(pust); var result = myContext.SaveChanges(); if (result > 0) { status = true; } else { return(status); } return(status); }
public bool Update(int id, StatusTypeParamVM statusTypeParamVM) { var get = Get(id); get.Update(id, statusTypeParamVM); myContext.Entry(get).State = System.Data.Entity.EntityState.Modified; var result = myContext.SaveChanges(); if (result > 0) { status = true; } else { status = false; } return(status); }
public bool Update(int id, StatusTypeParamVM statusTypeParamVM) { return(iStatusTypeParamRepository.Update(id, statusTypeParamVM)); }
public bool Insert(StatusTypeParamVM statusTypeParamVM) { return(string.IsNullOrWhiteSpace(statusTypeParamVM.StatusTypeModule) ? status : iStatusTypeParamRepository.Insert(statusTypeParamVM)); }