private void Init_Page() { IQCareUtils theUtil = new IQCareUtils(); DataTable theDT = theUtil.CreateTimeTable(15); DataRow theDR = theDT.NewRow(); theDR[0] = "0"; theDR[1] = "Select"; theDT.Rows.InsertAt(theDR, 0); ddBackupTime.DataSource = theDT; ddBackupTime.DataTextField = "Time"; ddBackupTime.DataValueField = "Id"; ddBackupTime.DataBind(); ddBackupDrive.SelectedValue = "Select"; IFacilitySetup BackupManger = (IFacilitySetup)ObjectFactory.CreateInstance("BusinessProcess.Administration.BFacility, BusinessProcess.Administration"); theDT = BackupManger.GetBackupSetup(); if (theDT.Rows[0].IsNull("BackupTime") != true) { ddBackupTime.SelectedValue = ((DateTime)theDT.Rows[0]["BackupTime"]).TimeOfDay.ToString(); } ddBackupDrive.SelectedValue = theDT.Rows[0]["BackupDrive"].ToString(); }
private void Init_Page() { if (Session["AppLocation"] == null || Session.Count == 0 || Session["AppUserID"].ToString() == "") { IQCareMsgBox.Show("SessionExpired", this); Response.Redirect("~/frmlogin.aspx", true); } IQCareUtils theUtil = new IQCareUtils(); DataTable theDT = theUtil.CreateTimeTable(15); DataRow theDR = theDT.NewRow(); theDR[0] = "0"; theDR[1] = "Select"; theDT.Rows.InsertAt(theDR, 0); ddBackupTime.DataSource = theDT; ddBackupTime.DataTextField = "Time"; ddBackupTime.DataValueField = "Id"; ddBackupTime.DataBind(); ddBackupDrive.SelectedValue = "Select"; IFacilitySetup BackupManger = (IFacilitySetup)ObjectFactory.CreateInstance("BusinessProcess.Administration.BFacility, BusinessProcess.Administration"); theDT = BackupManger.GetBackupSetup(); if (theDT.Rows[0].IsNull("BackupTime") != true) { ddBackupTime.SelectedValue = ((DateTime)theDT.Rows[0]["BackupTime"]).TimeOfDay.ToString(); } ddBackupDrive.SelectedValue = theDT.Rows[0]["BackupDrive"].ToString(); }
protected void Page_Load(object sender, EventArgs e) { Session["PatientId"] = 0; //(Master.FindControl("lblheaderfacility") as Label).Visible = false; //(Master.FindControl("lblheader") as Label).Text = "Back up/Restore"; (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Visible = false; (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "Back up/Restore"; if (IsPostBack == false) { txtbakuppath.Text = Session["BackupDrive"].ToString() + "\\IQCareDBBackup"; txtbakuppath.Attributes.Add("readonly", "true"); IQCareUtils theUtil = new IQCareUtils(); DataTable theDT = theUtil.CreateTimeTable(15); DataRow theDR = theDT.NewRow(); theDR[0] = "0"; theDR[1] = "Select"; theDT.Rows.InsertAt(theDR, 0); ddBackupTime.DataSource = theDT; ddBackupTime.DataTextField = "Time"; ddBackupTime.DataValueField = "Id"; ddBackupTime.DataBind(); ddBackupDrive.SelectedValue = "Select"; IFacilitySetup BackupManger = (IFacilitySetup)ObjectFactory.CreateInstance("BusinessProcess.Administration.BFacility, BusinessProcess.Administration"); theDT = BackupManger.GetBackupSetup(); if (theDT.Rows[0].IsNull("BackupTime") != true) { ddBackupTime.SelectedValue = ((DateTime)theDT.Rows[0]["BackupTime"]).TimeOfDay.ToString(); } if (theDT.Rows[0].IsNull("BackupDrive") != true) { txtbakuppath.Text = theDT.Rows[0]["BackupDrive"].ToString() + "\\IQCareDBBackup"; ddBackupDrive.SelectedValue = theDT.Rows[0]["BackupDrive"].ToString(); } } if (Application["BackupSetFile"] != null) { txtRestore.Text = Application["BackupSetFile"].ToString(); ViewState["BkpPosition"] = Application["Position"].ToString(); //chkDeidentified.Checked = false; Application.Remove("BackupSetFile"); Application.Remove("Position"); } }