Example #1
0
    protected void FormView1_DataBound(object sender, EventArgs e)
    {
        if (FormView1.CurrentMode == FormViewMode.ReadOnly)
        {
            int      rowcount = 0;
            Repeater fvMem    = (Repeater)FormView1.Row.Cells[0].FindControl("rpEngine1");
            DataSet  ds       = BLL_Tec_ErLog.ErLog_Seach_All_Details(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text), 1, 1, ref rowcount, 1, 6, null, null);


            if (fvMem != null)
            {
                fvMem.DataSource = ds.Tables[0];// BLL_Tec_ErLog.ErLog_MEngine_01_Search(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text), 1, 24, ref  rowcount);
                fvMem.DataBind();
            }
            Repeater fvDetails = (Repeater)FormView1.Row.Cells[0].FindControl("rpEngine2");
            if (fvDetails != null)
            {
                fvDetails.DataSource = ds.Tables[1];// BLL_Tec_ErLog.ErLog_ME_02_Search(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text), 1, 24, ref  rowcount);
                fvDetails.DataBind();
            }
            fvDetails = (Repeater)FormView1.Row.Cells[0].FindControl("rpEngine3");
            if (fvDetails != null)
            {
                fvDetails.DataSource = ds.Tables[2];// BLL_Tec_ErLog.ErLog_AC_FM_MISC_Search(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text),1, 24, ref  rowcount);
                fvDetails.DataBind();
            }
            fvMem = (Repeater)FormView1.Row.Cells[0].FindControl("rpTrainingDetails");
            if (fvMem != null)
            {
                fvMem.DataSource = ds.Tables[3];// BLL_Tec_ErLog.ErLog_Generator_Engine_Search(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text), 1, 24, ref  rowcount);
                fvMem.DataBind();
            }
            fvDetails = (Repeater)FormView1.Row.Cells[0].FindControl("Repeater1");
            if (fvDetails != null)
            {
                fvDetails.DataSource = ds.Tables[4];// BLL_Tec_ErLog.ErLog_Tank_Levels_Search(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text), 1, 24, ref  rowcount);
                fvDetails.DataBind();
            }
            fvDetails = (Repeater)FormView1.Row.Cells[0].FindControl("Repeater2");
            if (fvDetails != null)
            {
                fvDetails.DataSource = ds.Tables[5];// BLL_Tec_ErLog.ErLog_TASG_Search(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text),1, 24, ref  rowcount);
                fvDetails.DataBind();
            }
            fvDetails = (Repeater)FormView1.Row.Cells[0].FindControl("Repeater3");
            if (fvDetails != null)
            {
                fvDetails.DataSource = ds.Tables[6];// BLL_Tec_ErLog.ErLog_Engineer_Officer_Remarks_Search(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text), 1, 24, ref  rowcount);
                fvDetails.DataBind();
            }
        }
    }
Example #2
0
    protected void LoadDetails(DateTime lDate, int lLogW)
    {
        int rowcount = 0;
        //Repeater fvMem = (Repeater)FormView1.Row.Cells[0].FindControl("rpEngine1");



        int PageFrom = lLogW + 1;
        int PageTo   = PageFrom + 5;

        DataSet ds = BLL_Tec_ErLog.ErLog_Seach_All_Details(0, Convert.ToInt32(Session["DetVessel_Id"]), 1, 6, ref rowcount, PageFrom, PageTo, lDate, lDate.AddDays(1));

        for (int k = 0; k < 7; k++)
        {
            int i = 0;
            foreach (DataRow item in ds.Tables[k].Rows)
            {
                item["LOG_WATCH"] = Convert.ToDateTime(((Label)rpSilider.Items[i].FindControl("lblDateSlider")).Text).ToString("dd/MM/yy") + " " + item["LOG_WATCH"];
                i++;
            }
        }


        rpEngine1.DataSource = ds.Tables[0];
        rpEngine1.DataBind();
        rpEngine2.DataSource = ds.Tables[1];
        rpEngine2.DataBind();
        rpEngine3.DataSource = ds.Tables[2];
        rpEngine3.DataBind();
        rpTrainingDetails.DataSource = ds.Tables[3];
        rpTrainingDetails.DataBind();
        Repeater1.DataSource = ds.Tables[4];
        Repeater1.DataBind();
        Repeater2.DataSource = ds.Tables[5];
        Repeater2.DataBind();
        Repeater3.DataSource = ds.Tables[6];
        Repeater3.DataBind();
    }