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

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

            gvRoles.DataSource = product.GetRoles();
            gvRoles.DataBind();
        }
Ejemplo 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 = "";
        }
Ejemplo n.º 4
0
        public void BindGridView()
        {
            RolesDAL MonthlyReport = new RolesDAL();


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

                GridMonthlyReport.DataBind();
            }
        }
Ejemplo 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();
        }