Exemplo n.º 1
0
        public static void LoadResourceManagementData()
        {
            Service11111Client LService11111Client = null;
            BasicHttpBinding   LBasicHttpBinding   = null;
            EndpointAddress    LEndpointAddress    = null;
            List <string>      LListStrWcfArgs     = new List <string>();

            try
            {
                IDataTable00009    = new DataTable();
                IDataTable00010    = new DataTable();
                IListDataSetReturn = new List <DataSet>();
                LBasicHttpBinding  = WebHelper.CreateBasicHttpBingding();
                LEndpointAddress   = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service11111");
                OperationDataArgs11111 LWCFOperationReturn = new OperationDataArgs11111();
                LService11111Client = new Service11111Client(LBasicHttpBinding, LEndpointAddress);

                LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.TypeID.ToString());
                LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.GetConnectionString());
                LListStrWcfArgs.Add(GClassSessionInfo.RentInfo.Token);
                LWCFOperationReturn = LService11111Client.OperationMethodA(1, LListStrWcfArgs);
                if (LWCFOperationReturn.BoolReturn)
                {
                    IDataTable00010 = LWCFOperationReturn.DataSetReturn.Tables[0];
                }
                LoadResourcePropertiesDifine();
                LoadResourceType("211");             //0    License Server
                LoadResourceType("212");             //1    Dec Server
                LoadResourceType("213");             //2    CTI Hub Server
            }
            catch { }
            finally
            {
                if (LService11111Client != null)
                {
                    if (LService11111Client.State == CommunicationState.Opened)
                    {
                        LService11111Client.Close();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private static void LoadResourceType(string AStrTypeID)
        {
            Service11111Client LService11111Client = null;
            BasicHttpBinding   LBasicHttpBinding   = null;
            EndpointAddress    LEndpointAddress    = null;
            List <string>      LListStrWcfArgs     = new List <string>();

            try
            {
                LBasicHttpBinding = WebHelper.CreateBasicHttpBingding();
                LEndpointAddress  = WebHelper.CreateEndpointAddress(App.GClassSessionInfo.AppServerInfo, "Service11111");
                OperationDataArgs11111 LWCFOperationReturn = new OperationDataArgs11111();
                LService11111Client = new Service11111Client(LBasicHttpBinding, LEndpointAddress);

                LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.TypeID.ToString());
                LListStrWcfArgs.Add(GClassSessionInfo.DatabaseInfo.GetConnectionString());
                LListStrWcfArgs.Add(GClassSessionInfo.RentInfo.Token);
                LListStrWcfArgs.Add(AStrTypeID);
                LWCFOperationReturn = LService11111Client.OperationMethodA(2, LListStrWcfArgs);
                if (LWCFOperationReturn.BoolReturn)
                {
                    IListDataSetReturn.Add(LWCFOperationReturn.DataSetReturn);
                }
                else
                {
                    IListDataSetReturn.Add(null);
                }
            }
            catch { }
            finally
            {
                if (LService11111Client != null)
                {
                    if (LService11111Client.State == CommunicationState.Opened)
                    {
                        LService11111Client.Close();
                    }
                }
            }
        }