示例#1
0
    /// <summary>
    /// Loads data from the database for drop down lists
    /// </summary>
    private void PopulateControls0()
    {
        //
            // Populate the fndsion_noe_id Drop Down List
            //
            noeDataSet noeDS1 = new noeDataSet();
            noeService noeLogic1 = new noeService();

            if (noeLogic1.GetAll(noeDS1) > 0)
            {
                ListItem noeListItemNew;
                foreach (noeDataSet.noeRow noeCurrent in noeDS1.noe.Rows)
                {
                    //
                    // Populate the sklt_noe_id Drop Down List
                    //
                    if (noeCurrent.noe_cls==NoeCls.szh_sklt.ToString())
                    {
                        noeListItemNew = new ListItem();
                        noeListItemNew.Value = noeCurrent.noe_id.ToString();
                        noeListItemNew.Text = noeCurrent.noe_nam.ToString();

                        ctlsklt_noe_id.Items.Add(noeListItemNew);
                    }
                    //
                    // Populate the szh_fndsion Drop Down List
                    //

                    if (noeCurrent.noe_cls == NoeCls.szh_fndsion.ToString())
                    {
                        noeListItemNew = new ListItem();
                        noeListItemNew.Value = noeCurrent.noe_id.ToString();
                        noeListItemNew.Text = noeCurrent.noe_nam.ToString();

                        ctlfndsion_noe_id.Items.Add(noeListItemNew);
                    }
                    //
                    // Populate the sgf_noe_id Drop Down List
                    //
                    if (noeCurrent.noe_cls == NoeCls.szh_fndsion.ToString())
                    {
                        noeListItemNew = new ListItem();
                        noeListItemNew.Value = noeCurrent.noe_id.ToString();
                        noeListItemNew.Text = noeCurrent.noe_nam.ToString();

                        ctlfndsion_noe_id.Items.Add(noeListItemNew);
                    }

                }
            }
    }
示例#2
0
        /// <summary>
        /// Return all rows from the noe table
        /// </summary>
        /// <param name="dataSetFill">The DataSet to return the rows into</param>
        /// <returns>The number of rows added to the DataSet</returns>
        public virtual int GetAll(noeDataSet dataSetFill)
        {
            m_noeAdapter.UseConnectionAndTransaction(DbConnection);

            return m_noeAdapter.Fill(dataSetFill);
        }
示例#3
0
        /// <summary>
        /// Return all rows from the noe table by Primary Key
        /// </summary>
        /// <param name="dataSetFill">The DataSet to return the rows into</param>
        /// <param name="noe_id">The noe_id to use as search criteria</param>
        /// <returns>The number of rows added to the DataSet</returns>
        public virtual int GetBynoe_id(noeDataSet dataSetFill, Int32 noe_id)
        {
            m_noeAdapter.UseConnectionAndTransaction(DbConnection);

            return m_noeAdapter.FillBynoe_id(dataSetFill, noe_id);
        }
示例#4
0
        /// <summary>
        /// Perform any inserts, updates or deletes on the DataSet
        /// </summary>
        /// <param name="dataSetUpdate">The DataSet to update</param>
        /// <returns>The number of rows updated</returns>
        public virtual int UpdateDataSet(noeDataSet dataSetUpdate)
        {
            m_noeAdapter.UseConnectionAndTransaction(DbConnection);

            return m_noeAdapter.Update(dataSetUpdate);
        }