예제 #1
0
    protected void TestFedoraSettings_Click(object sender, EventArgs e)
    {
        if (FedoraPassword1.Text != FedoraPassword2.Text)
        {
            BlankStatus();
            TestFedoraStatus.Text = "Passwords Must Match";
            return;
        }

        try
        {
            FedoraAPIA.FedoraAPIAService svc = new FedoraAPIA.FedoraAPIAService();
            svc.Url = FedoraURL.Text + "services/access";
            System.Net.NetworkCredential _Credantials = new System.Net.NetworkCredential(FedoraUserName.Text, FedoraPassword1.Text);
            svc.Credentials = _Credantials;
            svc.findObjects(new string[] { "pid" }, "1", new FedoraAPIA.FieldSearchQuery());
            BlankStatus();
            TestFedoraStatus.Text      = "Test Successful";
            SaveFedoraSettings.Enabled = true;
        }
        catch (Exception ex)
        {
            BlankStatus();
            SaveFedoraSettings.Enabled = false;
            TestFedoraStatus.Text      = "Test Failed: " + ex.Message;
        }
        Updatecheckmarks();
    }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 private FedoraAPIA.FedoraAPIAService GetAccessService()
 {
     FedoraAPIA.FedoraAPIAService svc = new FedoraAPIA.FedoraAPIAService();
     svc.Url         = _AccessUrl;
     svc.Credentials = _Credantials;
     return(svc);
 }
    protected void TestFedoraSettings_Click(object sender, EventArgs e)
    {
        if (FedoraPassword1.Text != FedoraPassword2.Text)
        {
            BlankStatus();
            TestFedoraStatus.Text = "Passwords Must Match";
            return;
        }

        try
        {
            FedoraAPIA.FedoraAPIAService svc = new FedoraAPIA.FedoraAPIAService();
            svc.Url = FedoraURL.Text + "services/access";
            System.Net.NetworkCredential _Credantials = new System.Net.NetworkCredential(FedoraUserName.Text, FedoraPassword1.Text);
            svc.Credentials = _Credantials;
            svc.findObjects(new string[] { "pid" }, "1", new FedoraAPIA.FieldSearchQuery());
            BlankStatus();
            TestFedoraStatus.Text = "Test Successful";
            SaveFedoraSettings.Enabled = true;
        }
        catch (Exception ex)
        {
            BlankStatus();
            SaveFedoraSettings.Enabled = false;
            TestFedoraStatus.Text = "Test Failed: " + ex.Message;
        }
        Updatecheckmarks();
    }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 private FedoraAPIA.FedoraAPIAService GetAccessService()
 {
     FedoraAPIA.FedoraAPIAService svc = new FedoraAPIA.FedoraAPIAService();
     svc.Url = _AccessUrl;
     svc.Credentials = _Credantials;
     return svc;
 }