예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataTable dtReport = BLL_EMS_Report.Get_Reports_Details(Convert.ToInt32(Request.QueryString["VSLID"]), Convert.ToInt32(Request.QueryString["ID"]));
            fvBunk.DataSource = dtReport;
            fvBunk.DataBind();

            fvEng.DataSource = dtReport;
            fvEng.DataBind();

            fvCargo.DataSource = dtReport;
            fvCargo.DataBind();

            fvSeca.DataSource = dtReport;
            fvSeca.DataBind();

            fvSlud.DataSource = dtReport;
            fvSlud.DataBind();

            fvWater.DataSource = dtReport;
            fvWater.DataBind();
            if (dtReport.Rows.Count > 0)
            {
                lbldtFrom.Text  = dtReport.Rows[0]["DATE_FROM"].ToString();
                lbldtTO.Text    = dtReport.Rows[0]["DATE_TO"].ToString();
                lblRemark.Text  = dtReport.Rows[0]["GENERAL_REMARKS"].ToString();
                lblVslName.Text = dtReport.Rows[0]["Vessel_Name"].ToString();
            }
        }
    }
예제 #2
0
    public void BindEMSIndexReport()
    {
        int rowcount = ucCustomPagerItems.isCountRecord;

        string vesselcode = (ViewState["VesselCode"] == null) ? null : (ViewState["VesselCode"].ToString());

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

        DataTable dt = BLL_EMS_Report.Get_Reports_Index_DL(UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), UDFLib.ConvertIntegerToNull(ddlvessel.SelectedValue)
                                                           , UDFLib.ConvertDateToNull(txtfrom.Text), UDFLib.ConvertDateToNull(txtto.Text), sortbycoloumn, sortdirection
                                                           , ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

        if (ucCustomPagerItems.isCountRecord == 1)
        {
            ucCustomPagerItems.CountTotalRec = rowcount.ToString();
            ucCustomPagerItems.BuildPager();
        }

        if (dt.Rows.Count > 0)
        {
            gvEMSReport.DataSource = dt;
            gvEMSReport.DataBind();
        }
        else
        {
            gvEMSReport.DataSource = dt;
            gvEMSReport.DataBind();
        }
    }