Ejemplo n.º 1
0
 private void BuildWebServiceAccount(YellowstonePathology.Business.WebService.WebServiceAccount webServiceAccount)
 {
     using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
     {
         cn.Open();
         this.m_SQLCommand.Connection = cn;
         using (MySqlDataReader dr = this.m_SQLCommand.ExecuteReader(CommandBehavior.KeyInfo))
         {
             while (dr.Read())
             {
                 Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(webServiceAccount, dr);
                 sqlDataReaderPropertyWriter.WriteProperties();
             }
             if (dr.IsClosed == false)
             {
                 dr.NextResult();
                 while (dr.Read())
                 {
                     YellowstonePathology.Business.WebService.WebServiceAccountClient webServiceAccountClient = new YellowstonePathology.Business.WebService.WebServiceAccountClient();
                     Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(webServiceAccountClient, dr);
                     sqlDataReaderPropertyWriter.WriteProperties();
                     webServiceAccountClient.ClientName = dr["ClientName"].ToString();
                     webServiceAccount.WebServiceAccountClientCollection.Add(webServiceAccountClient);
                 }
             }
         }
     }
 }
        public WebServiceAccountEditDialog(int webServiceAccountId)
        {
            if (webServiceAccountId == 0)
            {
                this.m_WebServiceAccount = new Business.WebService.WebServiceAccount();
                this.m_WebServiceAccount.SetDefaults();
            }
            else
            {
                this.m_WebServiceAccount = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullWebServiceAccount(webServiceAccountId, this);
            }

            this.m_InitialPages = new List <string>();
            this.m_InitialPages.Add("OrderBrowser");
            this.m_InitialPages.Add("ReportBrowser");
            this.m_InitialPages.Add("BillingBrowser");
            this.m_InitialPages.Add("FileUpload");
            this.m_InitialPages.Add("PathologyDashboard");

            this.m_DownloadFileTypes = new List <string>();
            this.m_DownloadFileTypes.Add("XPS");
            this.m_DownloadFileTypes.Add("TIF");

            DataContext = this;
            InitializeComponent();
        }
Ejemplo n.º 3
0
        public WebServiceAccountClientEditDialog(YellowstonePathology.Business.WebService.WebServiceAccount webServiceAccount)
        {
            this.m_WebServiceAccount     = webServiceAccount;
            this.m_WebServiceClientViews = YellowstonePathology.Business.Gateway.WebServiceGateway.GetWebServiceClientViews();

            InitializeComponent();

            this.DataContext = this;
            Loaded          += WebServiceAccountClientEditDialog_Loaded;
        }
 private void ButtonDelete_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewWebServiceAccounts.SelectedItem != null)
     {
         YellowstonePathology.Business.WebService.WebServiceAccountView webServiceAccountView = (YellowstonePathology.Business.WebService.WebServiceAccountView) this.ListViewWebServiceAccounts.SelectedItem;
         YellowstonePathology.Business.WebService.WebServiceAccount     webServiceAccount     = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullWebServiceAccount(webServiceAccountView.WebServiceAccountId, this);
         YellowstonePathology.Business.Persistence.DocumentGateway.Instance.DeleteDocument(webServiceAccount, this);
         this.m_WebServiceAccountViewList = YellowstonePathology.Business.Gateway.WebServiceGateway.GetWebServiceAccountViewList();
         this.RefreshLimitedWebServiceAccountViewList();
     }
 }