Exemplo n.º 1
0
        public ActionResult SearchAdvanceAdditionalCharge(SearchAdvanceAdditionalChargeParametersVM model)
        {
            try
            {
                var charges = additionalChargeRepository.SearchAdvanceAdditionalCharge(model, LogInManager.LoggedInUserId);

                return(Json(new
                {
                    IsSuccess = true,
                    data = charges
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                Utility.Utility.LogError(e, "SearchAdvanceAdditionalCharge");
                return(Json(new { IsSuccess = false, errorMessage = e.Message }));
            }
        }
Exemplo n.º 2
0
        public List <SearchAdvanceAdditionalChargeResultVM> SearchAdvanceAdditionalCharge(SearchAdvanceAdditionalChargeParametersVM model, int userId)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter {
                    ParameterName = "@Code", Value = model.Code
                },
                new SqlParameter {
                    ParameterName = "@UserId", Value = userId
                }
            };

            var dt = DALHelper.GetDataTableWithExtendedTimeOut("SearchAdvanceAdditionalCharge", parameters);

            var charges = new List <SearchAdvanceAdditionalChargeResultVM>();

            charges = DALHelper.CreateListFromTable <SearchAdvanceAdditionalChargeResultVM>(dt);

            return(charges);
        }