Exemplo n.º 1
0
    public void FillGridViewAfterSearch(int VesselID)
    {
        DataTable dtFilters = new DataTable();

        dtFilters.Columns.Add("VesselManager", typeof(int));
        dtFilters.Columns.Add("Fleet", typeof(int));
        dtFilters.Columns.Add("Vessel", typeof(int));
        dtFilters.Columns.Add("RankID", typeof(int));
        dtFilters.Columns.Add("Nationality", typeof(int));
        dtFilters.Columns.Add("Status", typeof(int));
        dtFilters.Columns.Add("CalculatedStatus", typeof(int));
        dtFilters.Columns.Add("ManningOfficeID", typeof(int));
        dtFilters.Columns.Add("EOCDueIn", typeof(int));
        dtFilters.Columns.Add("JoiningDateFrom", typeof(String));
        dtFilters.Columns.Add("JoiningDateTo", typeof(String));
        dtFilters.Columns.Add("SearchText", typeof(String));

        DateTime dtFrom = DateTime.Parse(UDFLib.ConvertUserDateFormat(Convert.ToString("1900/01/01")));
        DateTime dtTo   = DateTime.Parse(UDFLib.ConvertUserDateFormat(Convert.ToString("2900/01/01")));

        int       MainStatusId = 0;
        DataTable dtMainStatus = objCrewAdmin.Get_CrewMainStatus();

        dtMainStatus.DefaultView.RowFilter = "Value='Onboard'";
        if (dtMainStatus.DefaultView.Count > 0)
        {
            MainStatusId = int.Parse(dtMainStatus.DefaultView[0]["Id"].ToString());
        }

        dtFilters.Rows.Add(0, 0, VesselID, 0, 0, MainStatusId, 0, 0, 0, dtFrom.ToString(UDFLib.ConvertUserDateFormat(Convert.ToString("yyyy/MM/dd"))), dtTo.ToString(UDFLib.ConvertUserDateFormat(Convert.ToString("yyyy/MM/dd"))), "");

        int PAGE_SIZE         = 100;
        int PAGE_INDEX        = 1;
        int SelectRecordCount = 0;

        DataTable dt = BLL_Crew_CrewList.Get_Crewlist_Index(dtFilters, GetSessionUserID(), PAGE_SIZE, PAGE_INDEX, ref SelectRecordCount);

        GridView1.DataSource = dt;
        GridView1.DataBind();

        ltCrewCount.Text = "Total number of crew on board : " + dt.Rows.Count.ToString();
        DataSet ds = BLL_Crew_CrewList.Get_Crewlist_IconView(VesselID, GetSessionUserID());

        ds.Relations.Add(new DataRelation("NestedCat", ds.Tables[0].Columns["rank_category"], ds.Tables[1].Columns["rank_category"]));
        ds.Tables[1].TableName = "Members";

        rpt1.DataSource = ds;
        rpt1.DataBind();
    }
Exemplo n.º 2
0
    public void Load_MainStatus()
    {
        DataTable dtMainStatus = objCrewAdmin.Get_CrewMainStatus();

        ddlMainStatus.DataSource     = dtMainStatus;
        ddlMainStatus.DataTextField  = "NAME";
        ddlMainStatus.DataValueField = "ID";
        ddlMainStatus.DataBind();
        ddlMainStatus.SelectedIndex = 0;

        dtMainStatus.DefaultView.RowFilter = "Value='Onboard'";
        ddlMainStatus.SelectedValue        = dtMainStatus.DefaultView[0]["Id"].ToString();
        hdOnBoardStatusId.Value            = dtMainStatus.DefaultView[0]["Id"].ToString();
        Load_CalculatedStatus(int.Parse(ddlMainStatus.SelectedValue));
    }
Exemplo n.º 3
0
    public void FillGridViewAfterSearch(int VesselID)
    {
        DataTable dtFilters = new DataTable();

        dtFilters.Columns.Add("VesselManager", typeof(int));
        dtFilters.Columns.Add("Fleet", typeof(int));
        dtFilters.Columns.Add("Vessel", typeof(int));
        dtFilters.Columns.Add("RankID", typeof(int));
        dtFilters.Columns.Add("Nationality", typeof(int));
        dtFilters.Columns.Add("Status", typeof(int));
        dtFilters.Columns.Add("CalculatedStatus", typeof(int));
        dtFilters.Columns.Add("ManningOfficeID", typeof(int));
        dtFilters.Columns.Add("EOCDueIn", typeof(int));
        dtFilters.Columns.Add("JoiningDateFrom", typeof(String));
        dtFilters.Columns.Add("JoiningDateTo", typeof(String));
        dtFilters.Columns.Add("SearchText", typeof(String));

        DateTime dtFrom = DateTime.Parse("1900/01/01");
        DateTime dtTo   = DateTime.Parse("2900/01/01");

        int       MainStatusId = 0;
        DataTable dtMainStatus = objCrewAdmin.Get_CrewMainStatus();

        dtMainStatus.DefaultView.RowFilter = "Value='Onboard'";
        if (dtMainStatus.DefaultView.Count > 0)
        {
            MainStatusId = int.Parse(dtMainStatus.DefaultView[0]["Id"].ToString());
        }

        dtFilters.Rows.Add(0, 0, VesselID, 0, 0, MainStatusId, 0, 0, 0, UDFLib.ConvertUserDateFormat(Convert.ToString(dtFrom.ToString())), UDFLib.ConvertUserDateFormat(Convert.ToString(dtTo.ToString())), "");

        int PAGE_SIZE         = 100;
        int PAGE_INDEX        = 1;
        int SelectRecordCount = 0;

        DataTable dt = BLL_Crew_CrewList.Get_Crewlist_Index(dtFilters, GetSessionUserID(), PAGE_SIZE, PAGE_INDEX, ref SelectRecordCount);

        GridView1.DataSource = dt;
        GridView1.DataBind();
    }