public static string getbackupdesc(string serverid, string companyid) { clsServer objserver = new clsServer(); DataSet ds = new DataSet(); string msg = ""; msg = "failure"; objserver.action = "getbackupdescription"; objserver.serverid = serverid; objserver.companyid = companyid; try { ds = objserver.ServerLog(); if (ds.Tables[0].Rows.Count > 0) { msg = ds.Tables[0].Rows[0]["BackupDescription"].ToString(); } return(msg); } catch (Exception ex) { //msg = ex.Message; return(msg); } }
public void fillFullReport(string from, string to, string serverid) { objserver.from = from; objserver.to = to; objserver.action = "getCompleteReport"; objserver.nid = serverid; objserver.companyid = Session["companyid"].ToString(); ds = objserver.ServerLog(); litfromdate.Text = from; littodate.Text = to; rptinner.DataSource = ds; rptinner.DataBind(); if (ds.Tables[1].Rows.Count > 0) { rptconfig.DataSource = ds.Tables[1]; rptconfig.DataBind(); rptconfig.Visible = true; div1.Visible = false; } else { rptconfig.Visible = false; div1.Visible = true; } if (ds.Tables[3].Rows.Count > 0) { replogreport.DataSource = ds.Tables[3]; replogreport.DataBind(); replogreport.Visible = true; divnolog.Visible = false; } else { divnolog.Visible = true; replogreport.Visible = false; } dsexcel = ds; }
/// <summary> /// Fill Report /// </summary> protected void fillgrid() { objserver.action = "getserverreport"; objserver.nid = ""; objserver.clientid = dropclient.Text; objserver.serverid = dropserver.Text; objserver.from = txtfromdate.Text; objserver.to = txttodate.Text; objserver.companyid = Session["companyid"].ToString(); ds = objserver.ServerLog(); int start = dgnews.PageSize * dgnews.PageIndex; int end = start + dgnews.PageSize; start = start + 1; if (end >= ds.Tables[0].Rows.Count) { end = ds.Tables[0].Rows.Count; } lblstart.Text = start.ToString(); lblend.Text = end.ToString(); lbltotalrecord.Text = ds.Tables[0].Rows.Count.ToString(); if (ds.Tables[0].Rows.Count > 0) { divnodata.Visible = false; dgnews.DataSource = ds; dgnews.DataBind(); btnexportcsv.Enabled = true; } else { if (!IsPostBack) { divnodata.Visible = false; } else { divnodata.Visible = true; } dgnews.DataSource = null; dgnews.DataBind(); btnexportcsv.Enabled = false; } dsexcel = ds; }
/// <summary> /// Check whether Log already exists for selected client server on selected date /// </summary> protected void checkexists() { objserver.nid = ""; headlogentry.Visible = false; objserver.action = "checkexists"; objserver.date = txtlogdate.Text; objserver.serverid = ddlserver.Text; ds = objserver.ServerLog(); if (ds.Tables[0].Rows.Count > 0) { GeneralMethod.alert(this.Page, "Log already exists"); rbtncpuutilization.Text = ds.Tables[0].Rows[0]["CPUUtilization"].ToString(); rbtnramutilization.Text = ds.Tables[0].Rows[0]["RAMUtilization"].ToString(); rdlupdated.Text = ds.Tables[0].Rows[0]["IsUpdated"].ToString(); txtUpdateSummary.Text = ds.Tables[0].Rows[0]["UpdateSummary"].ToString(); if (ds.Tables[0].Rows[0]["IsUpdated"] != null && ds.Tables[0].Rows[0]["IsUpdated"].ToString() == "Yes") { divupdated.Style.Add("display", "block"); } else { divupdated.Style.Add("display", "none"); } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp", "<script type='text/javascript'>showupdate();</script>", false); rdlbackup.Text = ds.Tables[0].Rows[0]["TakenBackUp"].ToString(); txtbackupdescription.Text = ds.Tables[0].Rows[0]["BackupDescription"].ToString(); if (ds.Tables[0].Rows[0]["TakenBackUp"] != null && ds.Tables[0].Rows[0]["TakenBackUp"].ToString() == "Yes") { divbackup.Style.Add("display", "block"); } else { divbackup.Style.Add("display", "none"); } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp", "<script type='text/javascript'>showbackup();</script>", false); //rbtnramutilization.Attributes.AddAttributes("", ""); string[] spacearr = ds.Tables[0].Rows[0]["Usedspace"].ToString().Split(' '); txt_space.Text = spacearr[0]; ddlspece.Text = spacearr[1]; hidserverlogid.Value = ds.Tables[0].Rows[0]["nid"].ToString(); if (ds.Tables[2].Rows.Count > 0) { createtable(); Session["itemtable"] = ds.Tables[2]; hidfilecount.Value = ds.Tables[2].Rows.Count.ToString(); repattachment.DataSource = ds.Tables[2]; repattachment.DataBind(); } if (ds.Tables[1].Rows.Count > 0) { dgnews.DataSource = ds.Tables[1]; dgnews.DataBind(); headlogentry.Visible = true; } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp", "<script type='text/javascript'>setramcolor();</script>", false); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp", "<script type='text/javascript'>setcpucolor();</script>", false); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp", "<script type='text/javascript'>showbackup();</script>", false); } }