Beispiel #1
0
        public JsonResult GetA62Data(string dataYear)
        {
            MSGReturnModel result = new MSGReturnModel();

            result.RETURN_FLAG = false;

            try
            {
                var A62 = A6Repository.GetA62(dataYear);
                result.RETURN_FLAG = A62.Item1;
                var jqgridParams = new A62ViewModel().TojqGridData();
                jqgridParams.Datas = A62.Item2;
                result.Datas       = Json(jqgridParams);
                if (!result.RETURN_FLAG)
                {
                    result.DESCRIPTION = Message_Type.not_Find_Any.GetDescription();
                }
            }
            catch (Exception ex)
            {
                result.RETURN_FLAG = false;
                result.DESCRIPTION = ex.Message;
            }

            return(Json(result));
        }
        public JsonResult GetData(string type, string year)
        {
            MSGReturnModel result = new MSGReturnModel();

            try
            {
                switch (type)
                {
                case "A62":     //Moody_LGD_Info(A62)資料
                    var A62 = A6Repository.GetA62(year);
                    result.RETURN_FLAG = A62.Item1;
                    var jqgridParams = new Exhibit7Model().TojqGridData();
                    jqgridParams.Datas = A62.Item2;
                    result.Datas       = Json(jqgridParams);
                    break;
                }
                if (!result.RETURN_FLAG)
                {
                    result.DESCRIPTION = Message_Type.not_Find_Any.GetDescription(type);
                }
            }
            catch (Exception ex)
            {
                result.RETURN_FLAG = false;
                result.DESCRIPTION = Message_Type.not_Find_Any.
                                     GetDescription(type, ex.Message);
            }
            return(Json(result));
        }