示例#1
0
    private void BindToCatalogueDLL()
    {
        using (BLL_PURC_Purchase objBLLPurc = new BLL_PURC_Purchase())
        {
            DataSet ds = objBLLPurc.LibraryCatalogueSearch(null, txtToMachinery.Text.Trim(), "SP", DDLToDept.SelectedValue, Int32.Parse(DDLToVessel.SelectedValue), "", 1, null, null, 1, 500, 1);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DDLToSystem.Items.Clear();
                DDLToSystem.DataSource     = ds.Tables[0];
                DDLToSystem.DataTextField  = "System_Description";
                DDLToSystem.DataValueField = "System_Code";
                DDLToSystem.DataBind();
                ListItem li = new ListItem("--SELECT ALL--", "0");
                DDLToSystem.Items.Insert(0, li);
            }
        }
    }
示例#2
0
 /// <summary>
 ///  Bind Catalogue (To)
 /// </summary>
 private void BindToCatalogueDLL(DataTable dt)
 {
     try
     {
         if (dt.Rows.Count > 0)
         {
             DDLToSystem.Items.Clear();
             DDLToSystem.DataSource     = dt;
             DDLToSystem.DataTextField  = "System_Description";
             DDLToSystem.DataValueField = "System_Code";
             DDLToSystem.DataBind();
         }
         else
         {
             DDLToSystem.Items.Clear();
         }
         ListItem li = new ListItem("--SELECT ALL--", "0");
         DDLToSystem.Items.Insert(0, li);
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
     }
 }