示例#1
0
        private static void Setup()
        {
            string s = Tech.Console.Properties.Resources.Conn;

            Tz.Deployment.Setup ss = new Tz.Deployment.Setup();
            try
            {
                ss.Reset(s);
                ss.Execute(s);
                ss.ExecuteClientSetup(s);
                System.Console.Write("stepup created");
            }
            catch (Exception ex)
            {
                System.Console.Write(ex.Message);
            }
            finally
            {
                System.Console.ReadKey();
            }
        }
示例#2
0
 public bool Save()
 {
     dServer = new Data.Server();
     if (_serverID == "")
     {
         _serverID = dServer.Save(Host,
                                  DBName,
                                  UserName,
                                  Password,
                                  Port, ServerName);
         if (_serverID != "")
         {
             Tz.Deployment.Setup s = new Tz.Deployment.Setup();
             s.ExecuteClientSetup(Connection());
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         if (dServer.Update(ServerID, Host,
                            DBName,
                            UserName,
                            Password,
                            Port, ServerName))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }