Exemplo n.º 1
0
        public JsonResult GetCardView(int ad_Window_ID, int ad_Tab_ID)
        {
            Ctx                               ctx = Session["ctx"] as Ctx;
            CardViewModel                     objCardViewModel = new CardViewModel();
            List <CardViewPropeties>          lstCardView      = objCardViewModel.GetCardView(ad_Window_ID, ad_Tab_ID, ctx);
            List <RolePropeties>              lstRole          = objCardViewModel.GetAllRoles(ctx);
            List <List <RolePropeties> >      lstCardViewRole  = new List <List <RolePropeties> >();
            List <CardViewConditionPropeties> lstCVConditon    = new List <CardViewConditionPropeties>();

            if (lstCardView != null)
            {
                for (int i = 0; i < lstCardView.Count; i++)
                {
                    lstCardViewRole.Add(objCardViewModel.GetCardViewRole(lstCardView[i].CardViewID, ctx));
                    lstCVConditon = objCardViewModel.GetCardViewCondition(lstCardView[i].CardViewID, ctx);
                }
            }
            ParameterPropeties objParamProperties = new ParameterPropeties()
            {
                lstCardViewData         = lstCardView,
                lstRoleData             = lstRole,
                lstCardViewRoleData     = lstCardViewRole,
                lstCardViewConditonData = lstCVConditon
            };
            List <ParameterPropeties> lstParamProperties = new List <ParameterPropeties>();

            lstParamProperties.Add(objParamProperties);
            var jsonResult = Json(JsonConvert.SerializeObject(lstParamProperties), JsonRequestBehavior.AllowGet);

            jsonResult.MaxJsonLength = int.MaxValue;
            return(jsonResult);
        }
Exemplo n.º 2
0
        public JsonResult GetCardViewColumns(int ad_CardView_ID)
        {
            Ctx                               ctx = Session["ctx"] as Ctx;
            CardViewModel                     objCardViewModel   = new CardViewModel();
            List <CardViewPropeties>          lstCardView        = objCardViewModel.GetCardViewColumns(ad_CardView_ID, ctx);
            List <CardViewConditionPropeties> lstCVConditon      = objCardViewModel.GetCardViewCondition(ad_CardView_ID, ctx);
            ParameterPropeties                objParamProperties = new ParameterPropeties()
            {
                lstCardViewData         = lstCardView,
                lstCardViewConditonData = lstCVConditon
            };
            List <ParameterPropeties> lstParamProperties = new List <ParameterPropeties>();

            lstParamProperties.Add(objParamProperties);
            var jsonResult = Json(JsonConvert.SerializeObject(lstParamProperties), JsonRequestBehavior.AllowGet);

            jsonResult.MaxJsonLength = int.MaxValue;
            return(jsonResult);
        }