Ejemplo n.º 1
0
        public string Validate(OtherExpenseViewModel _otherexpenseObj)
        {
            AppUA  appUA  = Session["AppUA"] as AppUA;
            object result = null;

            try
            {
                result = _otherExpenseBusiness.Validate(Mapper.Map <OtherExpenseViewModel, OtherExpense>(_otherexpenseObj));
                return(JsonConvert.SerializeObject(new { Result = "OK", Message = "", Records = result }));
            }
            catch (Exception ex)
            {
                AppConstMessage cm = c.GetMessage(ex.Message);
                return(JsonConvert.SerializeObject(new { Result = "ERROR", Message = cm.Message, Status = -1 }));
            }
        }