public void BindGridView()
        {
            RolesDAL DeptMonthlyReport = new RolesDAL();

            GridDeptWiseMonthlyReport.DataSource = DeptMonthlyReport.GetDeptMonthlyReport();
            GridDeptWiseMonthlyReport.DataBind();
        }
Esempio n. 2
0
        public void BindGridView()
        {
            RolesDAL product = new RolesDAL();

            gvRoles.DataSource = product.GetRoles();
            gvRoles.DataBind();
        }
Esempio n. 3
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string   roleId   = txtRoleId.Text;
            string   roleName = txtRoleName.Text;
            RolesDAL rd       = new RolesDAL();

            rd.InsertRole(roleId, roleName);
            BindGridView();
            txtRoleId.Text   = "";
            txtRoleName.Text = "";
        }
Esempio n. 4
0
        public void BindGridView()
        {
            RolesDAL MonthlyReport = new RolesDAL();


            if (Month != 0)
            {
                GridMonthlyReport.DataSource = MonthlyReport.GetMonthlyReport(Month);

                GridMonthlyReport.DataBind();
            }
        }
Esempio n. 5
0
        protected void gvRoles_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            Role        role = new Role();
            GridViewRow row  = gvRoles.Rows[e.RowIndex];

            role.Id   = gvRoles.DataKeys[e.RowIndex].Values[0].ToString();
            role.Name = (row.FindControl("txtRolesName") as TextBox).Text;
            RolesDAL roleDAL = new RolesDAL();

            roleDAL.UpdateRole(role);
            gvRoles.EditIndex = -1;
            BindGridView();
        }