Ejemplo n.º 1
0
    protected void ImgExpExcel_Click(object sender, ImageClickEventArgs e)
    {
        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 dtPendingList = BLL_QMSDB_Procedures.QMSDBProcedures_Search((DataTable)Session["sFleet"], (DataTable)Session["sVesselCode"], UDFLib.ConvertIntegerToNull(lstDept.SelectedValue), UDFLib.ConvertIntegerToNull(lstUser.SelectedValue), txtSearch.Text, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

        string[] HeaderCaptions  = { "Vessel", "Folder Name", "Procedure Code", "Procedure Name", "Department", "Access User", "Publish Date", "Publish Version", "Created By", "Approved By" };
        string[] DataColumnsName = { "Vessel_Name", "Folder_Name", "PROCEDURE_CODE", "PROCEDURES_NAME", "Department", "User_name", "CREATED_DATE", "PUBLISH_VERSION", "CREATED_USER", "User_name" };

        GridViewExportUtil.ExportToExcel(dtPendingList, HeaderCaptions, DataColumnsName, "ProcedureList", "Procedure List");
    }
Ejemplo n.º 2
0
    public void BindPublishDoc()
    {
        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 dtPendingList = BLL_QMSDB_Procedures.QMSDBProcedures_Search((DataTable)Session["sFleet"], (DataTable)Session["sVesselCode"], UDFLib.ConvertIntegerToNull(lstDept.SelectedValue), UDFLib.ConvertIntegerToNull(lstUser.SelectedValue), txtSearch.Text, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

        gvProcedureList.DataSource = dtPendingList;
        gvProcedureList.DataBind();
        if (ucCustomPagerItems.isCountRecord == 1)
        {
            ucCustomPagerItems.CountTotalRec = rowcount.ToString();
            ucCustomPagerItems.BuildPager();
        }
    }