public void BindGridView() { RolesDAL DeptMonthlyReport = new RolesDAL(); GridDeptWiseMonthlyReport.DataSource = DeptMonthlyReport.GetDeptMonthlyReport(); GridDeptWiseMonthlyReport.DataBind(); }
public void BindGridView() { RolesDAL product = new RolesDAL(); gvRoles.DataSource = product.GetRoles(); gvRoles.DataBind(); }
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 = ""; }
public void BindGridView() { RolesDAL MonthlyReport = new RolesDAL(); if (Month != 0) { GridMonthlyReport.DataSource = MonthlyReport.GetMonthlyReport(Month); GridMonthlyReport.DataBind(); } }
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(); }