コード例 #1
0
        public void BindGridView()
        {
            RolesDAL DeptMonthlyReport = new RolesDAL();

            GridDeptWiseMonthlyReport.DataSource = DeptMonthlyReport.GetDeptMonthlyReport();
            GridDeptWiseMonthlyReport.DataBind();
        }
コード例 #2
0
        public void BindGridView()
        {
            RolesDAL product = new RolesDAL();

            gvRoles.DataSource = product.GetRoles();
            gvRoles.DataBind();
        }
コード例 #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 = "";
        }
コード例 #4
0
        public void BindGridView()
        {
            RolesDAL MonthlyReport = new RolesDAL();


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

                GridMonthlyReport.DataBind();
            }
        }
コード例 #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();
        }