コード例 #1
0
        public void LoadData(string userId, string login_type)
        {
            BAL_Admin getData = new BAL_Admin();
            List <EmployeeDetails> employeeDetails = getData.BALGetAdminDetails(userId, login_type);

            gdvSuperUser.DataSource = getData.BALGetAdminDetails(userId, login_type);
            gdvSuperUser.DataBind();
        }
コード例 #2
0
        protected void gdvSuperUser_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GridViewRow row           = gdvSuperUser.Rows[e.RowIndex];
            long        salary        = long.Parse((row.FindControl("txtSalary") as TextBox).Text);
            string      designation   = (row.FindControl("txtDesignation") as TextBox).Text;
            BAL_Admin   adminApproval = new BAL_Admin();

            adminApproval.BALSuperUserAproval(Session["userId"].ToString(), salary, designation, "A");
            gdvSuperUser.EditIndex = -1;
            LoadData(Session["userId"].ToString(), "A");
        }
コード例 #3
0
        protected void lblButton_Click(object sender, EventArgs e)
        {
            StaffDetails staffDetails = new StaffDetails
                                        (
                Session["StaffId"].ToString(),
                DateTime.Parse((txtAcceptDate).Text.ToString()),
                txtCurrentLocation.Text.ToString()
                                        );
            BAL_Admin staffpackage = new BAL_Admin();

            staffpackage.BALStaffPackageEdit(Session["packageId"].ToString(), staffDetails);
            LoadData(Session["packageId"].ToString());
        }
コード例 #4
0
        protected void gdvStaffUser_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            BAL_Admin adminAcceptance = new BAL_Admin();

            if (e.CommandName == "Accept")
            {
                adminAcceptance.BALStaffUserAcceptance(Session["packageId"].ToString(), true);
            }
            else
            {
                adminAcceptance.BALStaffUserAcceptance(Session["packageId"].ToString(), false);
            }
        }
コード例 #5
0
    protected void btn_save_Click(object sender, EventArgs e)
    {
        DataTable data = BAL_Admin.Admin_login(txt_username.Text, txt_pass.Text);

        if (data.Rows.Count > 0)
        {
            Session["user_name"] = data.Rows[0]["am_user_name"].ToString();
            Response.Redirect("DashBoard.aspx");
        }
        else
        {
            Response.Write("<script> alter('Authentication Fail !!') </script>");
        }
    }