protected void btnCreate_Click(object sender, EventArgs e) { MojoCube.Api.Data.Sql sql = new MojoCube.Api.Data.Sql(); sql.Connect = "server=" + txtServer.Text.Trim() + ";user id=" + txtUserID.Text.Trim() + ";password="******";"; sql.Database = txtDatabase.Text.Trim(); sql.CreateDB(); sql.Connect = "server=" + txtServer.Text.Trim() + ";user id=" + txtUserID.Text.Trim() + ";password="******";database=" + txtDatabase.Text.Trim() + ";"; sql.RestoreDB(txtPath.Text.Trim()); Response.Redirect("../"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MojoCube.Api.Data.Sql sql = new MojoCube.Api.Data.Sql(); sql.GetInfo(MojoCube.Web.Connection.ConnString()); txtServer.Text = sql.Server; txtUserID.Text = sql.UserID; txtPassword.Text = sql.Password; txtDatabase.Text = sql.Database; txtPath.Text = Server.MapPath("~/Data/Backup/McCMS_V3.bak"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MojoCube.Api.Data.Sql sql = new MojoCube.Api.Data.Sql(); sql.GetInfo(MojoCube.Web.Connection.ConnString()); txtServer.Text = sql.Server; txtUser.Text = sql.UserID; txtPassword.Text = sql.Password; BindDatabaseDDL(); BindTableNameDDL(); txtUsing.Text = UsingString(); } }