public GoOutReason GetGoOutReasonID(GoOutReasonCriteria criteria) { using (TransactionEntities Context = new TransactionEntities()) { var result = Context.GetGoOutReasonID( goOutID: criteria.ID ).FirstOrDefault(); return(result); } }
public List <GoOutReason> SearchGoOutReason(GoOutReasonCriteria criteria) { using (TransactionEntities Context = new TransactionEntities()) { var result = Context.SearchGoOutReason( prodDateFrom: criteria.StartTime , prodDateTo: criteria.EndTime , empCode: criteria.EmpCode , empName: criteria.EmpName , userCode: criteria.UserCode ).ToList(); return(result); } }
public ActionResult SearchGoOutReason(DataSourceLoadOptions loadOptions, GoOutReasonCriteria criteria) { try { List <GoOutReasonViewModel> result = new List <GoOutReasonViewModel>(); if (!criteria.isFirstLoad) { criteria.UserCode = UserDetail.UserID; result = TransactionService.SearchGoOutReason(criteria).ToModels(); } return(Content(JsonConvert.SerializeObject(DataSourceLoader.Load(result, loadOptions)), ConstantValues.JSON_CONTENT_TYPE)); } catch (Exception ex) { throw ex; } }