Beispiel #1
0
        public System.Data.DataTable validateGG(string server, string userName, string password)
        {
            try
            {
                string url    = String.Empty;
                var    result = Settings.Server(server);



                if (result != null)
                {
                    url = result.Attribute("url").Value.ToString();
                    BasicHttpBinding bid     = null;
                    EndpointAddress  address = null;
                    GrinGlobal.Zone.Helpers.ProxyServer proxy = new Helpers.ProxyServer();
                    proxy.SetClientEndpoints(url, ref bid, ref address);
                    using (var client = new GUISoapClient(bid, address))
                    {
                        var serviceResult = client.ValidateLogin(false, userName, password);

                        return(serviceResult.Tables[1] != null ? serviceResult.Tables[1] : null);
                    }
                }
                else
                {
                    return(null);
                }
            }
            catch {
                return(null);
            }
        }
Beispiel #2
0
        public DataSet SaveData(string url, bool suppressExceptions, DataSet ds, string options)
        {
            BasicHttpBinding bid     = null;
            EndpointAddress  address = null;

            Helpers.ProxyServer proxy = new Helpers.ProxyServer();
            proxy.SetClientEndpoints(url, ref bid, ref address);

            //get user info
            string userName = HttpContext.Current.Session["username"].ToString();
            string password = HttpContext.Current.Session["userkey"].ToString();

            using (var client = new GUISoapClient(bid, address))
            {
                DataSet result = client.SaveData(suppressExceptions, userName, password, ds, options);

                return(result);
            }
        }
Beispiel #3
0
        public DataSet GetData(string url, bool suppressExceptions, string dataviewName, string delimitedParameterList, int offset, int limit, string options)
        {
            BasicHttpBinding bid     = null;
            EndpointAddress  address = null;

            Helpers.ProxyServer proxy = new Helpers.ProxyServer();
            proxy.SetClientEndpoints(url, ref bid, ref address);

            //get user info
            string userName = HttpContext.Current.Session["username"].ToString();
            string password = HttpContext.Current.Session["userkey"].ToString();

            using (var client = new GUISoapClient(bid, address))
            {
                DataSet ds = client.GetData(suppressExceptions, userName, password, dataviewName, delimitedParameterList, offset, limit, options);

                return(ds);
            }
        }