Exemplo n.º 1
0
        public GoOutReason GetGoOutReasonID(GoOutReasonCriteria criteria)
        {
            using (TransactionEntities Context = new TransactionEntities())
            {
                var result = Context.GetGoOutReasonID(
                    goOutID: criteria.ID
                    ).FirstOrDefault();

                return(result);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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;
            }
        }