Beispiel #1
0
        public string DynamicVipFormLoad(string pRequest)
        {
            var rd = new JIT.CPOS.BS.BLL.MobileModuleBLL.DynamicVipFormLoadRD();
            var rp = pRequest.DeserializeJSONTo <APIRequest <JIT.CPOS.BS.BLL.MobileModuleBLL.DynamicVipFormIDRP> >();

            rp.Parameters.Validate();

            rd = PrivatePublicMobileModuleBLL.DynamicVipFormLoad(rp.Parameters);
            var rsp = new SuccessResponse <IAPIResponseData>(rd);

            return(rsp.ToJSON());
        }
Beispiel #2
0
        public string DynamicVipPropertyList(string pRequest)
        {
            var rd = new JIT.CPOS.BS.BLL.MobileModuleBLL.DynamicVipPropertyListRD();
            var rp = pRequest.DeserializeJSONTo <APIRequest <JIT.CPOS.BS.BLL.MobileModuleBLL.PaginationRP> >();

            rp.Parameters.Validate();

            if (rp.Parameters.PageSize == 0)
            {
                rp.Parameters.PageSize = 50;
            }

            rd = PrivatePublicMobileModuleBLL.DynamicVipPropertyList(rp.Parameters);
            var rsp = new SuccessResponse <IAPIResponseData>(rd);

            return(rsp.ToJSON());
        }
Beispiel #3
0
        public string DynamicVipFormList(string pRequest)
        {
            var rd = new JIT.CPOS.BS.BLL.MobileModuleBLL.FormListRD();
            var rp = pRequest.DeserializeJSONTo <APIRequest <JIT.CPOS.BS.BLL.MobileModuleBLL.PaginationRP> >();

            var ds = PrivatePublicMobileModuleBLL.PagedQuery(
                new Utility.DataAccess.Query.IWhereCondition[] {
                new Utility.DataAccess.Query.EqualsCondition()
                {
                    FieldName = "CustomerId", Value = PrivateLoggingSessionInfo.ClientID
                },
                new Utility.DataAccess.Query.EqualsCondition()
                {
                    FieldName = "IsDelete", Value = 0
                }
            }
                , new Utility.DataAccess.Query.OrderBy[] {
                new Utility.DataAccess.Query.OrderBy()
                {
                    Direction = Utility.DataAccess.Query.OrderByDirections.Desc, FieldName = "CreateTime"
                }
            }
                , rp.Parameters.PageSize, rp.Parameters.PageIndex + 1);

            if (ds != null)
            {
                var formList = from d in ds.Entities
                               select new JIT.CPOS.BS.BLL.MobileModuleBLL.Form()
                {
                    FormID      = d.MobileModuleID.ToString(),
                    FormName    = d.ModuleName,
                    CreatedDate = d.CreateTime.ToString()
                };

                rd.TotalPage  = ds.PageCount;
                rd.TotalCount = ds.RowCount;
                rd.FormList   = formList.ToArray();
            }

            var rsp = new SuccessResponse <IAPIResponseData>(rd);

            return(rsp.ToJSON());
        }
Beispiel #4
0
        public string DynamicVipFormCreate(string pRequest)
        {
            var rp = pRequest.DeserializeJSONTo <APIRequest <JIT.CPOS.BS.BLL.MobileModuleBLL.DynamicVipFormCreateRP> >();

            rp.Parameters.Validate();

            var rd = new JIT.CPOS.BS.BLL.MobileModuleBLL.DynamicVipFormCreateRD();

            string result = "";

            result    = PrivatePublicMobileModuleBLL.CreateAndReturnID(rp.Parameters.Name);
            rd.FormID = result;

            var rsp = new SuccessResponse <IAPIResponseData>(rd);

            if (string.IsNullOrEmpty(result))
            {
                rsp.ResultCode = 204;
                rsp.Message    = "生成失败!";
            }

            return(rsp.ToJSON());
        }