예제 #1
0
 private bool Login()
 {
     try
     {
         var        start = ResolveStartUrl();
         HttpResult res   = null;
         this.DialogResult = DialogResult.None;
         while (res == null || res.Completed == false)
         {
             res = HttpInvoker.CallProgress(start + "&r=1", null, false);
             if (res == null)
             {
                 return(false);
             }
         }
         NHibernateSession.DbSettings["Server"]        = res.Extra["Server"];
         NHibernateSession.DbSettings["Database"]      = res.Extra["Database"];
         NHibernateSession.DbSettings["DatabaseType"]  = res.Extra["DatabaseType"];
         NHibernateSession.DbSettings["User"]          = res.Extra["User"];
         NHibernateSession.DbSettings["SslMode"]       = res.Extra["SslMode"];
         NHibernateSession.DbSettings["PasswordPlain"] = res.Extra["PasswordPlain"];
         NHibernateSession.DbSettings["SslMode"]       = "Preferred";
         UI.CurrentUserEmail = getCurrentUser();
         lblUser.Text        = getCurrentUser();
         return(true);
     }
     catch (Exception e)
     {
         MessageBox.Show(this, e.ToString());
         return(false);
     }
 }
예제 #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            string start = "services/backoffice/StartPublish?w=6";
            string step  = "services/backoffice/StepPublish";

            HttpInvoker.CallProgress(start, step);
            MessageBox.Show(this, "Listo!");
        }
        public override void Call()
        {
            Progress.Caption = "Vaciando caché de PDFs";
            Progress.Total   = 1;

            var        start = ResolveStartUrl();
            HttpResult res   = null;

            res = HttpInvoker.CallProgress(start, null, false);
        }