Exemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (radAdmin.Checked == true)
        {
            hdbmsClass lib          = new hdbmsClass();
            DataSet    ds           = new DataSet();
            string     msg          = "";
            int        sn           = Convert.ToInt32(txtSN.Text);
            decimal    subscriberID = Convert.ToDecimal(txtSubscriberID.Text);

            ds = lib.fetchSubscriberBySN_subID(sn, subscriberID, ref msg);

            if (msg != "" || ds.Tables.Count == 0)
            {
                lblErrorMsg.Text = "unable to fetch subscriber as a result of " + msg;
                MessageBox.Show("Incorrect Details!!!");
                return;
            }

            Response.Redirect("~/Login_Module/Human_Resource_Page.aspx");
        }
        else if (radStaff.Checked == true)
        {
            hdbmsClass lib      = new hdbmsClass();
            DataSet    ds       = new DataSet();
            string     msg      = "";
            string     userName = txtSN.Text;
            string     password = txtSubscriberID.Text;

            ds = lib.fetchStaffByUsername_Password(userName, password, ref msg);

            if (msg != "" || ds.Tables.Count == 0)
            {
                lblErrorMsg.Text = "unable to fetch staff as a result of " + msg;
                MessageBox.Show("Incorrect Details!!!");
                return;
            }

            Response.Redirect("~/Staff_Module/Doctors_Form.aspx");
        }
    }
Exemplo n.º 2
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        hdbmsClass lib          = new hdbmsClass();
        DataSet    ds           = new DataSet();
        string     msg          = "";
        int        sn           = Convert.ToInt32(txtSN.Text);
        decimal    subscriberID = Convert.ToDecimal(txtSubscriberID.Text);

        ds = lib.fetchSubscriberBySN_subID(sn, subscriberID, ref msg);

        if (msg != "" || ds.Tables.Count == 0)
        {
            lblErrorMsg.Text = "unable to fetch subscriber as a result of " + msg;
            MessageBox.Show("Incorrect Details!!!");
            return;
        }

        Panel6.Visible          = true;
        Panel5.Visible          = false;
        lblSubscriberID.Text    = ds.Tables[0].Rows[0]["SUBSCRIBER_ID"].ToString();
        lblSubscriberName.Text  = ds.Tables[0].Rows[0]["SUBCRIBER_NAME"].ToString();
        lblSubscriberName0.Text = ds.Tables[0].Rows[0]["SUBCRIBER_NAME"].ToString();
        // string subscriberName = lblSubscriberName.Text;
    }