Exemplo n.º 1
0
    public void BindToSubCatalogueDLL()
    {
        using (BLL_PURC_Purchase objBLLPurc = new BLL_PURC_Purchase())
        {
            DataSet ds = objBLLPurc.LibrarySubCatalogueSearch(DDLToSystem.SelectedValue, "", null, null, null, null, 1, 1000, 1);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DDLToSubsystem.Items.Clear();
                DDLToSubsystem.DataSource     = ds.Tables[0];
                DDLToSubsystem.DataTextField  = "Subsystem_Description";
                DDLToSubsystem.DataValueField = "ID";
                DDLToSubsystem.DataBind();
                ListItem li = new ListItem("--SELECT ALL--", "0");
                DDLToSubsystem.Items.Insert(0, li);
            }
        }
    }
Exemplo n.º 2
0
 /// <summary>
 ///  Bind SubCatalogue (To)
 /// </summary>
 public void BindToSubCatalogueDLL(DataTable dt)
 {
     try
     {
         if (dt.Rows.Count > 0)
         {
             DDLToSubsystem.Items.Clear();
             DDLToSubsystem.DataSource     = dt;
             DDLToSubsystem.DataTextField  = "Subsystem";
             DDLToSubsystem.DataValueField = "SubSystemCode";
             DDLToSubsystem.DataBind();
         }
         else
         {
             DDLToSubsystem.Items.Clear();
         }
         ListItem li = new ListItem("--SELECT ALL--", "0");
         DDLToSubsystem.Items.Insert(0, li);
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
     }
 }