Пример #1
0
    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];
            }
        }
    }