//Bind Grid Data #region [Bind Grid Data] public DataSet BindGridData_DL(EWA_ComposeMessage ObjEWA) { DataSet ds = new DataSet(); try { prmList = new string[14]; prmList[0] = "@Action"; prmList[1] = ObjEWA.Action; prmList[2] = "@OrgId"; prmList[3] = ObjEWA.OrgId; prmList[4] = "@CourseId"; prmList[5] = ObjEWA.CourseId; prmList[6] = "@BranchId"; prmList[7] = ObjEWA.BranchId; prmList[8] = "@ClassId"; prmList[9] = ObjEWA.ClassId; prmList[10] = "@DepartmentId"; prmList[11] = ObjEWA.DepartmentId; prmList[12] = "@DesignationId"; prmList[13] = ObjEWA.DesignationId; ds = ObjHelper.FillControl(prmList, "SP_SMS"); if (ds.Tables[0].Rows.Count > 0) { return(ds); } return(ds); } catch (Exception) { throw; } }
//Design Changed #region [Design Changed] protected void ddlDesignation_SelectedIndexChanged(object sender, EventArgs e) { try { EWA_ComposeMessage ObjEWA = new EWA_ComposeMessage(); ObjEWA.Action = "FetchEmployee"; ObjEWA.OrgId = Session["OrgId"].ToString(); ObjEWA.DepartmentId = ddlDepartment.SelectedValue.ToString(); ObjEWA.DesignationId = ddlDesignation.SelectedValue.ToString(); DataSet ds = BindGridData(ObjEWA, GrdEmployee); dsGrdEmployee = ds.Copy(); } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
//Student Class Chnaged #region [Student Class Changed] protected void ddlStudentClass_SelectedIndexChanged(object sender, EventArgs e) { try { EWA_ComposeMessage ObjEWA = new EWA_ComposeMessage(); ObjEWA.Action = "FetchStudent"; ObjEWA.OrgId = Session["OrgId"].ToString(); ObjEWA.CourseId = ddlStudentCourse.SelectedValue.ToString(); ObjEWA.ClassId = ddlStudentClass.SelectedValue.ToString(); ObjEWA.BranchId = ddlStudentBranch.SelectedValue.ToString(); DataSet ds = BindGridData(ObjEWA, GrdStudent); dsGrdStudent = ds.Copy(); } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
//Bind grid Data #region [Bind grid Data] private DataSet BindGridData(EWA_ComposeMessage ObjEWA, GridView Grd) { try { DataSet ds; BL_ComposeMessage ObjBL = new BL_ComposeMessage(); ds = ObjBL.BindGridData_BL(ObjEWA); if (ds.Tables[0].Rows.Count != 0) { Grd.DataSource = ds; Grd.DataBind(); Grd.Columns[3].Visible = true; } return(ds); } catch (Exception exp) { GeneralErr(exp.Message.ToString()); return(null); } }