Пример #1
0
        public string JsonList(int?Employee, string Department, string FromDate, string ToDate)
        {
            try
            {
                JsonResultData obj  = new JsonResultData();
                ArrayList      list = EmployeeSalary.List((FromDate == null ? "" : FromDate), (ToDate == null ? "" : ToDate), Convert.ToInt32((Employee == null ? 0 : Employee)), (Department == null ? "" : Department));
                obj.Data  = list;
                obj.Count = list.Count;
                string JSONString = JsonConvert.SerializeObject(obj, new IsoDateTimeConverter {
                    DateTimeFormat = "dd/MM/yyyy"
                });

                return(JSONString);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
 public ActionResult Index()
 {
     return(View(EmployeeSalary.List()));
 }