using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class rl_students_pg_RegisterCommitDate : System.Web.UI.Page
{
    //**************************
    SqlConnection con;
    SqlCommand cmd;
    //**************************
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string commitDate = "";
            C_myClass.MenueItemsCreate(User, panelMenues);
            Label lblTitle = (Label)this.Master.FindControl("lblTitle");
            lblTitle.Text = "دلیل رد ثبت نام";
            int regId = Int32.Parse(Request.QueryString["regId"].ToString());
            string conString = RamanConnectionString.LocalConnectionString();
            con = new SqlConnection(conString);
            cmd = con.CreateCommand();
            try
            {
                con.Open();
                cmd.CommandText = "select commitDate FROM t_Registers Where regId = " + regId;
                SqlDataReader rdr = cmd.ExecuteReader();
                if (rdr.HasRows)
                {
                    while (rdr.Read())
                    {
                        commitDate = (rdr.GetValue(0) != DBNull.Value ? rdr.GetString(0) : "");
                    }
                }
                rdr.Close();
                lblCommitDate.Text = "تاریخ تأیید ثبت نام : " + commitDate;
            }
            catch
            {
            }
            finally
            {
                if (con.State != ConnectionState.Closed)
                    con.Close();
            }
        }
        catch
        {
        }
        finally
        {
        }
    }
    protected void btnBack_Click(object sender, EventArgs e)
    {
        try
        {
            string returnUrl = Request.QueryString["returnUrl"].ToString();
            Response.Redirect(returnUrl);
        }
        catch
        {
        }
    }
}
