Ejemplo n.º 1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        hdbmsClass lib      = new hdbmsClass();
        DataSet    ds       = new DataSet();
        string     msg      = "";
        string     userName = txtUsername.Text;
        string     password = txtPassword.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;
        }

        Panel10.Visible = true;
        Panel5.Visible  = false;
        Panel1.Visible  = true;
        Panel11.Visible = true;

        lblStaffname.Text      = ds.Tables[0].Rows[0]["STAFF_NAME"].ToString();
        lblStaffID.Text        = ds.Tables[0].Rows[0]["STAFF_ID"].ToString();
        imgPassport.ImageUrl   = ds.Tables[0].Rows[0]["IMAGE_UPLOAD"].ToString();
        lblSubscriberName.Text = ds.Tables[0].Rows[0]["SUBSCRIBER_NAME"].ToString();
        lblSubscriberID.Text   = ds.Tables[0].Rows[0]["SUBSCRIBER_ID"].ToString();
        lblStaffname2.Text     = ds.Tables[0].Rows[0]["STAFF_NAME"].ToString();
    }
Ejemplo n.º 2
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");
        }
    }
Ejemplo n.º 3
0
    protected void Button4_Click(object sender, EventArgs e)
    {
        hdbmsClass lib      = new hdbmsClass();
        DataSet    ds       = new DataSet();
        string     msg      = "";
        string     userName = txtUsername.Text;
        string     password = txtPassword.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;
        }

        Panel3.Visible = false;
        Panel4.Visible = true;



        lblSubscriberName.Text = ds.Tables[0].Rows[0]["SUBSCRIBER_NAME"].ToString();
    }