示例#1
0
    public void FillDDL()
    {
        try
        {
            DataTable dt = BLL_Tec_ErLog.GET_ERLOGVERSIONS(int.Parse(lblLogId.Text), int.Parse(lblVesselId.Text));
            DDLVersion.DataSource     = dt;
            DDLVersion.DataTextField  = "Version";
            DDLVersion.DataValueField = "LOG_ID";
            DDLVersion.DataBind();
            ListItem li = new ListItem("--SELECT ALL--", "0");
            DDLVersion.SelectedValue = lblLogId.Text;
            if (dt.Rows.Count == 1)
            {
                versionrowlbl.Visible = false;
                versionrow.Visible    = false;
                lblVersion.Visible    = false;
                DDLVersion.Visible    = false;
            }



            //DataTable dtVessel = objVsl.Get_VesselList(0, 0, Convert.ToInt32(Session["USERCOMPANYID"].ToString()), "", Convert.ToInt32(Session["USERCOMPANYID"].ToString()));
            //DDLVessel.DataSource = dtVessel;
            //DDLVessel.DataTextField = "Vessel_name";
            //DDLVessel.DataValueField = "Vessel_id";
            //DDLVessel.DataBind();
            //DDLVessel.Items.Insert(0, new ListItem("--SELECT ALL--", null));
        }
        catch (Exception ex)
        {
        }
        finally
        {
        }
    }