Ejemplo n.º 1
0
    protected void BindItems()
    {
        string sFromDate = "";
        string sToDate   = "";

        if (ViewState["sFromDT"].ToString() == "")
        {
            sFromDate = "1900/01/01";
        }
        else
        {
            sFromDate = ViewState["sFromDT"].ToString();
        }
        if (ViewState["sToDT"].ToString() == "")
        {
            sToDate = "1900/01/01";
        }
        else
        {
            sToDate = ViewState["sToDT"].ToString();
        }

        int Record_count = 0;

        gvVoyageReport.DataSource = BLL_OPS_VoyageReports.Get_VoyageReportIndex(ViewState["sReportType"].ToString(), Convert.ToInt32(ViewState["iVesselID"]), Convert.ToInt32(ViewState["iLocationID"]), sFromDate, sToDate, Convert.ToInt32(ViewState["iFleetID"]),
                                                                                UDFLib.ConvertIntegerToNull(ucCustomPagerItems.CurrentPageIndex),
                                                                                UDFLib.ConvertIntegerToNull(ucCustomPagerItems.PageSize), ref Record_count, UDFLib.ConvertStringToNull(ViewState["Sort_Column"]), UDFLib.ConvertStringToNull(ViewState["Sort_Direction"]));

        gvVoyageReport.DataBind();

        ucCustomPagerItems.CountTotalRec = Record_count.ToString();
        ucCustomPagerItems.BuildPager();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            UserAccessValidation();



            BindFleetDLL();
            DDLFleet.SelectedValue = Session["USERFLEETID"].ToString();
            BindVesselDDL();

            BLL_Infra_VesselLib objVessel = new BLL_Infra_VesselLib();
            ddllocation.DataSource     = objVessel.GetVesselLocations();
            ddllocation.DataTextField  = "location_name";
            ddllocation.DataValueField = "location_code";
            ddllocation.DataBind();
            ListItem allloc = new ListItem("SELECT ALL", "0");
            ddllocation.Items.Insert(0, allloc);
            if (Session["Vessel_ID"] != null)
            {
                ddlvessel.SelectedValue = Session["Vessel_ID"].ToString();
                ViewState["iVesselID"]  = ddlvessel.SelectedValue;
                Session["Vessel_ID"]    = null;
            }
            else
            {
                ViewState["iVesselID"] = ddlvessel.SelectedValue;
            }

            ViewState["sReportType"] = "NDA";

            ViewState["iLocationID"] = "0";
            ViewState["sFromDT"]     = DateTime.Now.AddDays(-5).ToString("dd/MM/yyyy");
            ViewState["sToDT"]       = DateTime.Now.ToString("dd/MM/yyyy");
            ViewState["iFleetID"]    = DDLFleet.SelectedValue;


            txtfrom.Text = DateTime.Now.AddDays(-5).ToString("dd/MM/yyyy");
            txtto.Text   = DateTime.Now.ToString("dd/MM/yyyy");

            dtCPROB     = BLL_OPS_VoyageReports.OPS_Get_RecentCPROB();
            dtVesselROB = BLL_OPS_VoyageReports.Get_VoyageReportIndex("NDA", 0, 0, "1800/01/01", "1900/01/01", 0);

            BindItems();
        }

        // Bind("NDA",0,0);
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["id"] != null)
            {
                string[]  filters   = Request.QueryString["filters"].Split('~');
                DataTable dtReports = BLL_OPS_VoyageReports.Get_VoyageReportIndex(filters[0], Convert.ToInt32(filters[1]), Convert.ToInt32(filters[2]), filters[3], filters[4], Convert.ToInt32(filters[5]));
                dtReports.PrimaryKey = new DataColumn[] { dtReports.Columns["pkid"] };
                ctlRecordNavigationReport.InitRecords(dtReports);
                DataRow dr = dtReports.Rows.Find(Int32.Parse(Request.QueryString["id"]));
                ctlRecordNavigationReport.CurrentIndex = dtReports.Rows.IndexOf(dr);

                BindReport(dr);
            }
        }
    }