Ejemplo n.º 1
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of ListMasters</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			11/6/2009 11:39:08 AM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static ListMasters PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper, string ConnectionString)
        {
            ListMasters list = new ListMasters();

            if (rdr.Read())
            {
                ListMaster obj = new ListMaster(ConnectionString);
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
                while (rdr.Read())
                {
                    obj = new ListMaster(ConnectionString);
                    PopulateObjectFromReader(obj, rdr);
                    list.Add(obj);
                }
                oDatabaseHelper.Dispose();
                return list;
            }
            else
            {
                oDatabaseHelper.Dispose();
                return null;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of ListMasters</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			11/6/2009 11:39:08 AM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static ListMasters PopulateObjectsFromReader(IDataReader rdr,string ConnectionString)
        {
            ListMasters list = new ListMasters();

            while (rdr.Read())
            {
                ListMaster obj = new ListMaster(ConnectionString);
                PopulateObjectFromReader(obj,rdr);
                list.Add(obj);
            }
            return list;
        }
Ejemplo n.º 3
0
 public void bindCheckboxList()
 {
     try
     {
         listMasters = ListMaster.SelectAll(ConnectionString);
         ddlList1.DataSource = listMasters;
         ddlList1.DataTextField = "ListName";
         ddlList1.DataValueField = "ListMasterID";
         ddlList1.DataBind();
         ListItem item = new ListItem();
         item.Text = "All";
         item.Value = "All";
         ddlList1.Items.Insert(0, item);
         ddlList1.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }