Beispiel #1
0
        //string connstring = "Data Source=F48604;Initial Catalog=Vaccine; User ID=sa; password=123; Integrated Security=False";
        protected void Page_Load(object sender, EventArgs e)
        {
            TxtDOV.Focus();
            TextCardno.Attributes.Add("readonly", "readonly");
            //AgeMonths.Attributes.Add("readonly", "readonly");
            //AgeDays.Attributes.Add("readonly", "readonly");

            if (Session["User"] != null)
            {
                Label1.Text = Convert.ToString(Session["User"]);
            }
            else
            {
                Response.Redirect("login.aspx");
            }

            if (!Page.IsPostBack)
            {
                //this.TextDSSID.Text = Request.QueryString["ID"];
                this.TextCardno.Text = Request.QueryString["Card"];
                PopulateFields();

                string currentDate = DateTime.Today.ToShortDateString();
                CompareDOV.ValueToCompare = currentDate;
            }
        }
Beispiel #2
0
        //string connstring = "Data Source=F48604;Initial Catalog=Vaccine; User ID=sa; password=123; Integrated Security=False";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.TextDSSID.Text = Request.QueryString["ID"];
                if (Convert.ToString(Session["aabb"]) == "1")
                {
                    this.TextCardno.Text = Request.QueryString["Card"];
                }
                else if (Convert.ToString(Session["aabb"]) == "2")
                {
                    this.TextName.Text  = Request.QueryString["cname"];
                    this.TextMname.Text = Request.QueryString["mname"];
                    this.TextFname.Text = Request.QueryString["hname"];
                }
                TextDSSID.Attributes.Add("readonly", "readonly");
                //AgeMonths.Attributes.Add("readonly", "readonly");
                //AgeDays.Attributes.Add("readonly", "readonly");
                TxtDOV.Focus();

                if (Session["User"] != null)
                {
                    Label1.Text = Convert.ToString(Session["User"]).ToUpper();
                }
                else
                {
                    Response.Redirect("login.aspx");
                }


                if (!Page.IsPostBack)
                {
                    string currentDate = DateTime.Today.ToShortDateString();
                    CompareDOV.ValueToCompare = currentDate;
                    //show();
                }
            }
        }