コード例 #1
0
    protected void BindSourcesDests()
    {
        try
        {
            objBAL = new ClsBAL();
            ObjDataset = (DataSet)objBAL.GetSourcesDests();
            if (ObjDataset != null)
            {
                if (ObjDataset.Tables.Count > 0)
                {
                    if (ObjDataset.Tables[0].Rows.Count > 0)
                    {
                        ddllocation.DataSource = ObjDataset.Tables[0];
                        ddllocation.DataTextField = "SourceName";
                        ddllocation.DataBind();
                        ddllocation.Items.Insert(0, "ALL");

                    }

                }
            }

        }
        catch (Exception ex)
        {

            throw ex;
        }
    }
コード例 #2
0
    protected void BindSourcesDests()
    {
        try
        {
            objBAL = new ClsBAL();
            ObjDataset = (DataSet)objBAL.GetSourcesDests();
            if (ObjDataset != null)
            {
                if (ObjDataset.Tables.Count > 0)
                {
                    if (ObjDataset.Tables[0].Rows.Count > 0)
                    {
                        ddlSources.DataSource = ObjDataset.Tables[0];
                        ddlSources.DataTextField = "SourceName";
                        ddlSources.DataBind();
                        ddlSources.Items.Insert(0, "ALL");

                    }
                    if (ObjDataset.Tables[1].Rows.Count > 0)
                    {
                        ddlDestinations.DataSource = ObjDataset.Tables[1];
                        ddlDestinations.DataTextField = "DestinationName";
                        ddlDestinations.DataBind();
                        ddlDestinations.Items.Insert(0, "ALL");
                    }
                    if (ObjDataset.Tables[2].Rows.Count > 0)
                    {
                        ddloperator.DataSource = ObjDataset.Tables[2];
                        ddloperator.DataTextField = "TravelOPName";
                        ddloperator.DataBind();
                        ddloperator.Items.Insert(0, "ALL");
                    }
                }
            }

        }
        catch (Exception ex)
        {

            throw ex;
        }
    }
コード例 #3
0
 protected void BindSourcesDests()
 {
     try
     {
         ClsBAL objManabusBAL = new ClsBAL();
         DataSet ObjDataset = (DataSet)objManabusBAL.GetSourcesDests();
         if (ObjDataset != null)
         {
             if (ObjDataset.Tables.Count > 0)
             {
                 if (ObjDataset.Tables[0].Rows.Count > 0)
                 {
                     ddlSources.DataSource = ObjDataset.Tables[0];
                     ddlSources.DataTextField = "SourceName";
                     ddlSources.DataBind();
                     ddlSources.Items.Insert(0, "ALL");
                 }
                 if (ObjDataset.Tables[1].Rows.Count > 0)
                 {
                     ddlDestinations.DataSource = ObjDataset.Tables[1];
                     ddlDestinations.DataTextField = "DestinationName";
                     ddlDestinations.DataBind();
                     ddlDestinations.Items.Insert(0, "ALL");
                 }
                 //if (ObjDataset.Tables[2].Rows.Count > 0)
                 //{
                 //    ddlOperator.DataSource = ObjDataset.Tables[2];
                 //    ddlOperator.DataTextField = "TravelOPName";
                 //    ddlOperator.DataBind();
                 //    ddlOperator.Items.Insert(0, "ALL");
                 //}
             }
         }
     }
     catch (Exception ex)
     {
         lblMsg.InnerHtml = ex.Message;
         throw ex;
     }
 }