Exemplo n.º 1
0
        public DefaultResult <List <Entity> > GetModelByIDS(List <int> idlist, string otherString)
        {
            string xml_Content = string.Format(Xml_IdList_Temp, "idlist", GetXmlIdListContent(idlist));
            string xml         = string.Format(Xml_Body_Temp, "GetModelByIDS", xml_Content, otherString);

            var result = WCFPostHelper.Post <List <Entity> >(typeof(Entity).Name, "GetModelByIDS", RemoteAddress, xml);

            return(result);
        }
Exemplo n.º 2
0
        public DefaultResult <Entity> GetModelByID(int id, string otherString)
        {
            string xml_Content = GetXmlKeyContent(new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("id", id),
            });
            string xml = string.Format(Xml_Body_Temp, "GetModelByID", xml_Content, otherString);

            var result = WCFPostHelper.Post <Entity>(typeof(Entity).Name, "GetModelByID", RemoteAddress, xml);

            return(result);
        }
Exemplo n.º 3
0
        public DefaultResult <List <Entity> > GetListByQuery(int page, int pagesize, List <CommonFilterModel> filters, List <CommonOrderModel> orders, string otherString)
        {
            string xml_Content = GetXmlKeyContent(new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("page", page),
                new KeyValuePair <string, object>("pagesize", pagesize)
            });
            string xml_Filters = string.Format(Xml_Filters_Temp, GetXmlFilter(filters));
            string xml_Orders  = string.Format(Xml_Orders_Temp, GetXmlOrders(orders));
            string xml         = string.Format(Xml_Body_Temp, "GetListByQuery", xml_Content + xml_Filters + xml_Orders, otherString);

            var result = WCFPostHelper.Post <List <Entity> >(typeof(Entity).Name, "GetListByQuery", RemoteAddress, xml);


            return(result);
        }