コード例 #1
0
    /// <summary>
    /// Loading Certificate
    /// </summary>
    protected void Load_CertificateList()
    {
        try
        {
            int FleetID   = UDFLib.ConvertToInteger(ddlFleet.SelectedValue);
            int VesselID  = UDFLib.ConvertToInteger(ddlVessel.SelectedValue);
            int CatID     = UDFLib.ConvertToInteger(ddlCategoryFilter.SelectedValue);
            int MainCatID = UDFLib.ConvertToInteger(ddlMainCategory.SelectedValue);

            int rowcount = ucCustomPagerItems.isCountRecord;

            string sortbycoloumn = (ViewState["CA_SORTBYCOLOUMN"] == null) ? null : (ViewState["CA_SORTBYCOLOUMN"].ToString());
            int?   sortdirection = null; if (ViewState["CA_SORTDIRECTION"] != null)
            {
                sortdirection = Int32.Parse(ViewState["CA_SORTDIRECTION"].ToString());
            }

            DataTable dt = objBLL.Get_AssignedSurvayList(FleetID, VesselID, MainCatID, CatID, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

            if (ucCustomPagerItems.isCountRecord == 1)
            {
                ucCustomPagerItems.CountTotalRec = rowcount.ToString();
                ucCustomPagerItems.BuildPager();
            }
            GridView_Certificate.DataSource = dt;
            GridView_Certificate.DataBind();
        }
        catch (Exception)
        {
        }
    }
コード例 #2
0
ファイル: SurveyLib.aspx.cs プロジェクト: 15831944/JIBE-ERP
    protected void Load_CertificateList()
    {
        int    CatID      = UDFLib.ConvertToInteger(ddlCategoryFilter.SelectedValue);
        string SearchText = txtCertificate.Text;

        DataTable dt = objBLL.Get_SurvayCertificate_List(CatID, SearchText);

        GridView_Certificate.DataSource = dt;
        GridView_Certificate.DataBind();
    }
コード例 #3
0
    /// <summary>
    /// to bind saved /updated survey certificate to grid view.
    /// </summary>
    public void BindSurveyCertificate()
    {
        try
        {
            int rowcount = ucCustomPagerItems.isCountRecord;

            string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString());
            int?   sortdirection = null; if (ViewState["SORTDIRECTION"] != null)
            {
                sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString());
            }

            DataTable dt = objBLL.Get_Survey_Certificate_Search(txtfilter.Text != "" ? txtfilter.Text : null, UDFLib.ConvertIntegerToNull(ddlMainCategory.SelectedValue), UDFLib.ConvertIntegerToNull(ddlCategoryFilter.SelectedValue), sortbycoloumn, sortdirection
                                                                , ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

            if (ucCustomPagerItems.isCountRecord == 1)
            {
                ucCustomPagerItems.CountTotalRec = rowcount.ToString();
                ucCustomPagerItems.BuildPager();
            }
            GridView_Certificate.DataSource = dt;
            GridView_Certificate.DataBind();
            if (dt.Rows.Count > 0)
            {
                ImgExpExcel.Visible = true;
            }
            else
            {
                ImgExpExcel.Visible = false;
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }