Beispiel #1
0
        public static CustomList <PopulateDropdownList> GetAllReferenceTransaction(Int32 DocListID, Int32 RefType)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <PopulateDropdownList> CmnTransactionCollection = new CustomList <PopulateDropdownList>();
            IDataReader reader = null;
            String      sql    = "spGetReferenceMasterTableData " + DocListID + "," + RefType;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    PopulateDropdownList newCmnTransaction = new PopulateDropdownList();
                    newCmnTransaction.SetData(reader);
                    CmnTransactionCollection.Add(newCmnTransaction);
                }
                return(CmnTransactionCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
        private void PopulateParameter()
        {
            lstPopulateDropdown = new CustomList<PopulateDropdownList>();
            PopulateDropdownList obj = new PopulateDropdownList();
            obj.ValueDoc = "Prefix";
            obj.Text = "Prefix";
            lstPopulateDropdown.Add(obj);

            PopulateDropdownList obj1 = new PopulateDropdownList();
            obj1.ValueDoc = "Sufix";
            obj1.Text = "Sufix";
            lstPopulateDropdown.Add(obj1);

            PopulateDropdownList obj2 = new PopulateDropdownList();
            obj2.ValueDoc = "AutoNo";
            obj2.Text = "AutoNo";
            lstPopulateDropdown.Add(obj2);

            PopulateDropdownList obj3 = new PopulateDropdownList();
            obj3.ValueDoc = "Year";
            obj3.Text = "Year";
            lstPopulateDropdown.Add(obj3);

            PopulateDropdownList obj4 = new PopulateDropdownList();
            obj4.ValueDoc = "Month";
            obj4.Text = "Month";
            lstPopulateDropdown.Add(obj4);

            PopulateDropdownList obj5 = new PopulateDropdownList();
            obj5.ValueDoc = "Day";
            obj5.Text = "Day";
            lstPopulateDropdown.Add(obj5);
        }
 public static CustomList<PopulateDropdownList> GetAllReferenceTransaction(Int32 DocListID,Int32 RefType)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<PopulateDropdownList> CmnTransactionCollection = new CustomList<PopulateDropdownList>();
     IDataReader reader = null;
     String sql = "spGetReferenceMasterTableData " + DocListID+","+RefType;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             PopulateDropdownList newCmnTransaction = new PopulateDropdownList();
             newCmnTransaction.SetData(reader);
             CmnTransactionCollection.Add(newCmnTransaction);
         }
         return CmnTransactionCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }