コード例 #1
0
    private void bindgrvSYS_Boarddetail()
    {
        SYS_Board     = new SYS_Board();
        BAL_SYS_Board = new SYS_Board_BLogic();

        DataSet dsSelect = new DataSet();

        dsSelect = BAL_SYS_Board.BAL_SYS_Board_Select(SYS_Board, "SelectAll");
        if (dsSelect.Tables.Count > 0)
        {
            string searchCondition = string.Empty;
            if (txtBoardSearch.Text != string.Empty)
            {
                searchCondition = "Board like '%" + txtBoardSearch.Text + "%'";
            }

            if (txtCodeSearch.Text != string.Empty)
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = searchCondition + " Code like '%" + txtCodeSearch.Text + "%'";
            }

            if (rlstActive.SelectedValue == "0")
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = searchCondition + " IsActive = 0";
            }
            else if (rlstActive.SelectedValue == "1")
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = searchCondition + " IsActive = 1";
            }

            DataView dv = new DataView(dsSelect.Tables[0]);
            dv.RowFilter = searchCondition;

            DataSet dsSelectSub = new DataSet();
            dsSelectSub.Tables.Add(dv.ToTable());

            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(grvSYS_Boarddetail, dsSelectSub, this.SortField, this.SortDirection);
        }
        else
        {
            grvSYS_Boarddetail.DataSource = null;
            grvSYS_Boarddetail.DataBind();
        }
    }
コード例 #2
0
    private void bindgrvSchoolRegistrationBMSdetail(int SchRegID)
    {
        try
        {
            DataSet dsSelect = new DataSet();
            dsSelect = GetClassRecord(dsSelect, SchRegID);

            if (dsSelect.Tables.Count > Convert.ToInt32(EnumFile.AssignValue.Zero))
            {
                gvSchoolRegistrationBMSdetail.Columns[0].Visible = false;


                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.BindGridWithSorting(gvSchoolRegistrationBMSdetail, dsSelect, this.SortField, this.SortDirection);
            }
            else
            {
                //grvSchoolRegistrationBMSdetail.DataSource = dsSelect.Tables[0];

                gvSchoolRegistrationBMSdetail.DataBind();
            }
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
コード例 #3
0
    public void BindGridNew(GridView GV, UserList PUserList, string sortfield, string sortdirection, string IsActive)
    {
        DataSet dsGrid = new DataSet();

        dsGrid = this.BAL_UserList_SelectNew(PUserList);
        if (dsGrid.Tables[0].Rows.Count > 0 && dsGrid.Tables[0] != null)
        {
            DataView dv = new DataView(dsGrid.Tables[0]);
            DataSet  ds = new DataSet();
            if (IsActive == "Yes")
            {
                dv.RowFilter = "IsActive ='Yes'";
                ds.Tables.Add(dv.ToTable());
            }
            else if (IsActive == "No")
            {
                dv.RowFilter = "IsActive ='No'";
                ds.Tables.Add(dv.ToTable());
            }
            else
            {
                ds = dsGrid;
            }
            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(GV, ds, sortfield, sortdirection);
        }
    }
コード例 #4
0
    private void BindPostGrid()
    {
        oForum     = new Forum();
        oForum_BAL = new Forum_BAL();

        DataSet ods = oForum_BAL.Forum_Select_All(oForum);

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(this.GvPost, ods, this.SortField, this.SortDirection);
    }
コード例 #5
0
    private void BindAdmissionGrid(string status)
    {
        oAdmission        = new Admission();
        oAdmission_BLogic = new Admission_BLogic();

        DataSet ods = oAdmission_BLogic.Admission_Select_ByInteraction(DateTime.Now, DateTime.Now);

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(this.GvAdmission, ods, this.SortField, this.SortDirection);
    }
コード例 #6
0
    private void bindgrvSchoolRegistrationBMSdetail(int SchRegID)
    {
        try
        {
            DataSet dsSelect = new DataSet();
            dsSelect = GetClassRecord(dsSelect, SchRegID);

            if (dsSelect.Tables.Count > Convert.ToInt32(EnumFile.AssignValue.Zero))
            {
                string st = Session["TypeofPageView"].ToString();

                if (Session["TypeofPageView"].ToString() == "DetailsOnly")
                {
                    tdActDe.Style.Add("display", "none");
                    tdApproveReject.Style.Add("display", "none");
                    btnUpdate.Style.Add("display", "none");
                    txtSchName.Enabled            = false;
                    txtValSchAddress.Enabled      = false;
                    txtValPloatNo.Enabled         = false;
                    txtValBlockNoSurvey.Enabled   = false;
                    txtValCity.Enabled            = false;
                    txtValPincode.Enabled         = false;
                    txtValFaxNo.Enabled           = false;
                    txtValMobileNo.Enabled        = false;
                    txtValLandline.Enabled        = false;
                    txtValSchoolStartYear.Enabled = false;
                    txtValSchlWebsite.Enabled     = false;
                    txtValSchlMailID.Enabled      = false;

                    gvSchoolRegistrationBMSdetail.Columns[0].Visible = false;
                }
                else
                {
                }

                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.BindGridWithSorting(gvSchoolRegistrationBMSdetail, dsSelect, this.SortField, this.SortDirection);
            }
            else
            {
                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.BindGridWithSorting(gvSchoolRegistrationBMSdetail, null, this.SortField, this.SortDirection);
            }
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
コード例 #7
0
    /// <summary>
    /// <Description>Bind Announcement Grid with all Announcement Details</Description>
    /// </summary>
    protected void BindGridAnnouncement()
    {
        DataSet dsSelect = new DataSet();

        dsSelect = this.BAL_Announcement.BAL_SelectAnnouncementBySchoolID(Convert.ToInt32(this.Session["SchoolID"]), "SelectAll");
        gvAnnouncementDetails.DataSource = dsSelect;
        if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero))
        {
            GridViewOperations GvOperation = new GridViewOperations();
            GvOperation.BindGridWithSorting(this.gvAnnouncementDetails, dsSelect, this.SortField, this.SortDirection);
        }
        else
        {
            gvAnnouncementDetails.DataSource = null;
            gvAnnouncementDetails.DataBind();
        }
    }
コード例 #8
0
    private void BindGrvResultDetails()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultClassroomwise_Select(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlsubject.SelectedValue), Convert.ToInt32(ddlchapter.SelectedValue), Convert.ToInt32(ddltopic.SelectedValue), Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text));

        if (ds.Tables.Count > 0)
        {
            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(GrvResultDetails, ds, this.SortField, this.SortDirection);
        }
        else
        {
            GrvResultDetails.DataSource = null;
            GrvResultDetails.DataBind();
        }
    }
コード例 #9
0
    public void BindGrid()
    {
        obj_SYS_Chapter     = new SYS_Chapter();
        obj_BAL_SYS_Chapter = new SYS_Chapter_BLogic();

        obj_SYS_Chapter.bmsid     = Convert.ToInt64(ViewState["BMSID"]);
        obj_SYS_Chapter.subjectid = Convert.ToInt16(ddlSubject.SelectedValue);

        DataSet ds = obj_BAL_SYS_Chapter.BAL_SYS_ChapterSeq_Select(obj_SYS_Chapter);

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(grdChapter, ds, this.SortField, this.SortDirection);

        //if (ds.Tables.Count > 0)
        //{
        //    grdChapter.DataSource = ds;
        //    grdChapter.DataBind();
        //}
    }
    private void BindAdmissionGrid(string status)
    {
        oAdmission        = new Admission();
        oAdmission_BLogic = new Admission_BLogic();

        oAdmission.LastAdmissionStatus = (!string.IsNullOrEmpty(status)) ? status : null;

        DataSet ods = oAdmission_BLogic.Admission_Select_All(oAdmission);

        ViewState["ExportExcel"] = ods;

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(this.GvAdmission, ods, this.SortField, this.SortDirection);

        if (ods.Tables[0].Rows.Count == 0)
        {
            dvExcel.Visible = false;
        }
    }
コード例 #11
0
    protected void BindGridEmployeeDetails()
    {
        DataSet dsSelect        = new DataSet();
        string  SearchCondition = string.Empty;

        if (pnlSearch.CssClass == "Visible")
        {
            if (txtSearchFirstName.Text != string.Empty)
            {
                SearchCondition = "and Employee.FirstName like '%" + txtSearchFirstName.Text + "%'";
            }

            if (txtSearchMiddleName.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.MiddleName like '%" + txtSearchMiddleName.Text + "%'";
            }

            if (txtSearchLastName.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.LastName like '%" + txtSearchLastName.Text + "%'";
            }

            if (txtSearchDOB.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.DateOfBirth = '" + txtSearchDOB.Text + "'";
            }

            if (rlstSearchGender.SelectedValue != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.Gender = '" + rlstSearchGender.SelectedValue + "'";
            }

            if (txtSearchBloodGroup.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.BloodGroup like '%" + txtSearchBloodGroup.Text + "%'";
            }

            if (txtSearchQualification.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.Qualification like '%" + txtSearchQualification.Text + "%'";
            }

            if (txtSearchDesignation.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.Designation like '%" + txtSearchDesignation.Text + "%'";
            }
            if (rlstActive.SelectedValue == "0")
            {
                SearchCondition = SearchCondition + SearchCondition + "and IsActive=0";
            }
            else if (rlstActive.SelectedValue == "1")
            {
                SearchCondition = SearchCondition + SearchCondition + "and IsActive=1";
            }
        }


        dsSelect = this.BAL_Employee.BAL_EmployeeDetailsBySchoolID(Convert.ToInt32(this.Session["SchoolID"]), SearchCondition);

        if (dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero))
        {
            GridViewOperations GvOperation = new GridViewOperations();
            GvOperation.BindGridWithSorting(this.gvEmployeeDetails, dsSelect, this.SortField, this.SortDirection);
            int row = dsSelect.Tables[0].Rows.Count;
            ViewState["EmployeeID"] = dsSelect.Tables[0].Rows[row - 1]["EmployeeID"];
        }
        else
        {
            gvEmployeeDetails.DataSource = null;
            gvEmployeeDetails.DataBind();
        }
    }
コード例 #12
0
    protected void BindGridAnnouncementDetails()
    {
        DataSet dsSelect        = new DataSet();
        string  SearchCondition = string.Empty;

        ////if (Convert.ToInt32(ddlBoardMediumStandard.SelectedValue) > 0)
        ////{
        SearchCondition = "and Announcement.BMSID = " + ddlBoardMediumStandard.SelectedValue;
        ////}

        int    count          = (int)EnumFile.AssignValue.Zero;
        string divisionIDList = string.Empty;

        foreach (ListItem chk in clstDivision.Items)
        {
            if (chk.Selected == true)
            {
                if (count == (int)EnumFile.AssignValue.Zero)
                {
                    divisionIDList = chk.Value.ToString();
                }
                else
                {
                    divisionIDList = divisionIDList + " , " + chk.Value.ToString();
                }

                count = count + 1;
            }
        }

        if (count > ((int)EnumFile.AssignValue.Zero))
        {
            SearchCondition = SearchCondition + " and Announcement.DivisionID IN (" + divisionIDList + ") ";
        }

        if (txtSearchAnnouncement.Text != string.Empty)
        {
            SearchCondition = SearchCondition + " and Announcement like '%" + txtSearchAnnouncement.Text + "%'";
        }

        if (txtStartDate.Text != string.Empty || txtEndDate.Text != string.Empty)
        {
            if (txtStartDate.Text != string.Empty && txtEndDate.Text != string.Empty)
            {
                SearchCondition = SearchCondition + " and Announcement.StartDate between '" + txtStartDate.Text + "'and '" + txtEndDate.Text + "'";
            }
            else if (txtStartDate.Text != string.Empty)
            {
                SearchCondition = SearchCondition + " and Announcement.StartDate = '" + txtStartDate.Text + "'";
            }
            else if (txtEndDate.Text != string.Empty)
            {
                SearchCondition = SearchCondition + " and Announcement.EndDate = '" + txtEndDate.Text + "'";
            }
        }

        dsSelect = this.BAL_Announcement.BAL_SelectAnnouncementBySchoolID1(Convert.ToInt32(this.Session["SchoolID"]), SearchCondition);
        if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero))
        {
            GridViewOperations GvOperation = new GridViewOperations();
            GvOperation.BindGridWithSorting(this.gvAnnouncementDetails, dsSelect, this.SortField, this.SortDirection);
        }
        else
        {
            gvAnnouncementDetails.DataSource = null;
            gvAnnouncementDetails.DataBind();
        }
    }
コード例 #13
0
    /// <summary>
    /// Method will be used to bind grid view.
    /// </summary>
    private void bindgrvSYS_Chapterdetail()
    {
        try
        {
            SYS_Chapter     = new SYS_Chapter();
            BAL_SYS_Chapter = new SYS_Chapter_BLogic();
            DataSet dsSelect = new DataSet();
            dsSelect = BAL_SYS_Chapter.BAL_SYS_Chapter_Select(SYS_Chapter, "AdminSelect");
            if (dsSelect.Tables.Count > 0)
            {
                string searchCondition = string.Empty;
                if (ddlBMSSearch.SelectedValue != "0")
                {
                    searchCondition = "BMSID=" + ddlBMSSearch.SelectedValue;
                }

                if (ddlSubjectSearch.SelectedValue != "0")
                {
                    if (searchCondition != string.Empty)
                    {
                        searchCondition = searchCondition + " and ";
                        searchCondition = searchCondition + "SubjectID=" + ddlSubjectSearch.SelectedValue;
                    }
                    else
                    {
                        searchCondition = "SubjectID=" + ddlSubjectSearch.SelectedValue;
                    }
                }

                if (txtChapterIndexSearch.Text != string.Empty)
                {
                    if (searchCondition != string.Empty)
                    {
                        searchCondition = searchCondition + " and ";
                        searchCondition = searchCondition + "ChapterIndex=" + txtChapterIndexSearch.Text;
                    }
                    else
                    {
                        searchCondition = "ChapterIndex=" + txtChapterIndexSearch.Text;
                    }
                }

                if (txtChapterSearch.Text != string.Empty)
                {
                    if (searchCondition != string.Empty)
                    {
                        searchCondition = searchCondition + " and ";
                        searchCondition = searchCondition + "Chapter like '%" + txtChapterSearch.Text + "%'";
                    }
                    else
                    {
                        searchCondition = "Chapter like '%" + txtChapterSearch.Text + "%'";
                    }
                }

                if (txtCodeSearch.Text != string.Empty)
                {
                    if (searchCondition != string.Empty)
                    {
                        searchCondition = searchCondition + " and ";
                        searchCondition = searchCondition + "Code like '%" + txtCodeSearch.Text + "%'";
                    }
                    else
                    {
                        searchCondition = "Code like '%" + txtCodeSearch.Text + "%'";
                    }
                }

                if (txtDescriptionSearch.Text != string.Empty)
                {
                    if (searchCondition != string.Empty)
                    {
                        searchCondition = searchCondition + " and ";
                        searchCondition = searchCondition + "Description like '%" + txtDescriptionSearch.Text + "%'";
                    }
                    else
                    {
                        searchCondition = "Description like '%" + txtDescriptionSearch.Text + "%'";
                    }
                }

                if (rlstActive.SelectedValue == "1")
                {
                    if (searchCondition != string.Empty)
                    {
                        searchCondition = searchCondition + " and ";
                        searchCondition = searchCondition + "IsActive=" + true;
                    }
                    else
                    {
                        searchCondition = "IsActive=" + true;
                    }
                }
                else if (rlstActive.SelectedValue == "0")
                {
                    if (searchCondition != string.Empty)
                    {
                        searchCondition = searchCondition + " and ";
                        searchCondition = searchCondition + "IsActive=" + false;
                    }
                    else
                    {
                        searchCondition = "IsActive=" + false;
                    }
                }

                DataView dv = new DataView(dsSelect.Tables[0]);
                dv.RowFilter = searchCondition;

                DataSet dsChapter = new DataSet();
                dsChapter.Tables.Add(dv.ToTable());

                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.BindGridWithSorting(grvSYS_Chapterdetail, dsChapter, this.SortField, this.SortDirection);
            }
            else
            {
                grvSYS_Chapterdetail.DataSource = null;
                grvSYS_Chapterdetail.DataBind();
            }
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
コード例 #14
0
    private void bindgrvStudentdetail()
    {
        Student     = new Student();
        BAL_Student = new Student_BLogic();
        DataSet dsSelect = new DataSet();

        dsSelect = BAL_Student.BAL_Student_Select(Student, "SelectAll");
        if (dsSelect.Tables.Count > 0)
        {
            string Condition = string.Empty;
            if (ltrlSchoolIDSearch.Text != string.Empty)
            {
                Condition = "SchoolID=" + ltrlSchoolIDSearch.Text;
            }

            if (ddlBMSSearch.SelectedValue != "0")
            {
                if (Condition != string.Empty)
                {
                    Condition = Condition + " And ";
                    Condition = Condition + "BMSID=" + ddlBMSSearch.SelectedValue;
                }
                else
                {
                    Condition = "BMSID=" + ddlBMSSearch.SelectedValue;
                }
            }

            if (ddlDivisionSearch.SelectedValue != "0")
            {
                if (Condition != string.Empty)
                {
                    Condition = Condition + " And ";
                    Condition = Condition + "DivisionID=" + ddlDivisionSearch.SelectedValue;
                }
                else
                {
                    Condition = "DivisionID=" + ddlDivisionSearch.SelectedValue;
                }
            }


            if (txtFirstNameSearch.Text != string.Empty)
            {
                if (Condition != string.Empty)
                {
                    Condition = Condition + " And ";
                    Condition = Condition + "FirstName=" + txtFirstNameSearch.Text;
                }
                else
                {
                    Condition = "FirstName=" + txtFirstNameSearch.Text;
                }
            }

            if (txtRollNoSearch.Text != string.Empty)
            {
                if (Condition != string.Empty)
                {
                    Condition = Condition + " And ";
                    Condition = Condition + "RollNo=" + txtRollNoSearch.Text;
                }
                else
                {
                    Condition = "RollNo=" + txtRollNoSearch.Text;
                }
            }

            //if (txtDateOfBirthSearch.Text != string.Empty)
            //{
            //    if (Condition != string.Empty)
            //    {
            //        Condition = Condition + " And ";
            //        Condition = Condition + "DateOfBirth=" + txtDateOfBirthSearch.Text;
            //    }
            //    else
            //    {
            //        Condition = "DateOfBirth=" + txtDateOfBirthSearch.Text;
            //    }
            //}

            if (rdbListGenderSearch.SelectedValue == "0")
            {
                if (Condition != string.Empty)
                {
                    Condition = Condition + " And ";
                    Condition = Condition + "Gender='" + "M'";
                }
                else
                {
                    Condition = "Gender='" + "M'";
                }
            }
            else if (rdbListGenderSearch.SelectedValue == "1")
            {
                if (Condition != string.Empty)
                {
                    Condition = Condition + " And ";
                    Condition = Condition + "Gender='" + "F'";
                }
                else
                {
                    Condition = "Gender='" + "F'";
                }
            }


            //if (rlstAddActive.SelectedValue == "1")
            //{
            //    if (Condition != string.Empty)
            //    {
            //        Condition = Condition + " And ";
            //        Condition = Condition + "IsActive=" + true;
            //    }
            //    else
            //    {
            //        Condition = "IsActive=" + true;
            //    }
            //}
            //else if (rlstAddActive.SelectedValue == "0")
            //{
            //    if (Condition != string.Empty)
            //    {
            //        Condition = Condition + " And ";
            //        Condition = Condition + "IsActive=" + false;
            //    }
            //    else
            //    {
            //        Condition = "IsActive=" + false;
            //    }
            //}

            DataView dv = new DataView(dsSelect.Tables[0]);
            dv.RowFilter = Condition;

            DataSet FilteredData = new DataSet();
            FilteredData.Tables.Add(dv.ToTable());

            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(grvStudentdetail, FilteredData, this.SortField, this.SortDirection);
        }
        else
        {
            grvStudentdetail.DataSource = null;
            grvStudentdetail.DataBind();
        }
    }