예제 #1
0
    //public static DataTable dtVesselROB;
    //public static DataTable dtCPROB;

    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);

        scriptManager.RegisterPostBackControl(this.btnExport);
        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"] = "NDAX";

            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);
    }