public void CallConnection() { ClsSqlConnection obj = new ClsSqlConnection(); DataSet ds = obj.Select("spRegisterUserReport"); if (ds.Tables.Count > 0) { BindControls.BindGridView(gvwUsers, ds.Tables[0]); } }
public void CallConnection(string MailType) { if (Session["Data"] == null) { ClsSqlConnection obj = new ClsSqlConnection(); DataSet ds = obj.Select(int.Parse(Session["CustomerId"].ToString()), MailType); if (ds.Tables.Count > 0) { BindControls.BindGridView(gvwMails, ds.Tables[0]); } } else if (Session["Data"] != null) { BindControls.BindGridView(gvwMails, (Session["Data"] as DataSet).Tables[0]); Session["Data"] = null; } }
public void CallConnection(int id, string MailType) { ClsSqlConnection obj = new ClsSqlConnection(); DataSet ds = obj.Select(id, MailType); Session["Data"] = ds; if (MailType == "ReadMail") { if (ds.Tables.Count > 0) { BindControls.BindFormView(frmReadMail, ds.Tables[0]); } } else { Response.Redirect("~/Masters/ViewMail.aspx"); } }
protected void btnForward_Click(object sender, EventArgs e) { Session["DMaildId"] = int.Parse((frmReadMail.Row.FindControl("hdnMailId") as HiddenField).Value); Session["ComeFrom"] = int.Parse((frmReadMail.Row.FindControl("Label1") as Label).Text); Response.Redirect("~/ComposeMail.aspx?val=forward&forward=" + int.Parse(Request.QueryString["val"].ToString()) + "&From=" + BindControls.passwordEncrypt((frmReadMail.Row.FindControl("Label3") as Label).Text, "encryptionkey")); }
public void CallConnection1(int id, string Type) { ClsSqlConnection obj = new ClsSqlConnection(); DataSet ds = obj.Select1(id, Type); if (ds.Tables.Count > 0) { if (Request.QueryString.Count > 0) { if (Request.QueryString["val"].ToString() == "reply") { TxtSubject.Text = ds.Tables[0].Rows[0]["Subject"].ToString(); TxtSubject.Enabled = false; TxtTo.Text = ds.Tables[0].Rows[0]["ToEmail"].ToString(); } else if (Request.QueryString["val"].ToString() == "forward") { TxtSubject.Text = ds.Tables[0].Rows[0]["Subject"].ToString(); TxtSubject.Enabled = false; txtBody.Text = "<br/>---------- Forwarded message ----------<br/>From: " + BindControls.passwordDecrypt(Request.QueryString["From"].ToString(), "encryptionkey") + ds.Tables[0].Rows[0]["Text"].ToString(); } } else if (Type == "ComposeMail") { ViewState["EmailIds"] = ds.Tables[0]; } } }