Пример #1
0
 public PhoneTypeList GetAll()
 {
     _list.Clear();
     Database db = new Database("student");
     db.Command.CommandType = System.Data.CommandType.StoredProcedure;
     db.Command.CommandText = "tblPhoneTypeGetAll";
     DataTable dt = db.ExecuteQuery();
     PhoneType Blank = new PhoneType();
     Blank.Type = "Select Phone Type";
     _list.Add(Blank);
     foreach (DataRow dr in dt.Rows)
     {
         PhoneType e = new PhoneType();
         e.Initialize(dr);
         e.InitializeBusinessData(dr);
         e.IsDirty = false;
         e.IsNew = false;
         e.evtIsSavable += new IsSavableHandler(s_evtIsSavable);
         _list.Add(e);
     }
     return this;
 }
Пример #2
0
        public PhoneTypeList GetAll()
        {
            _list.Clear();
            Database db = new Database("student");

            db.Command.CommandType = System.Data.CommandType.StoredProcedure;
            db.Command.CommandText = "tblPhoneTypeGetAll";
            DataTable dt    = db.ExecuteQuery();
            PhoneType Blank = new PhoneType();

            Blank.Type = "Select Phone Type";
            _list.Add(Blank);
            foreach (DataRow dr in dt.Rows)
            {
                PhoneType e = new PhoneType();
                e.Initialize(dr);
                e.InitializeBusinessData(dr);
                e.IsDirty       = false;
                e.IsNew         = false;
                e.evtIsSavable += new IsSavableHandler(s_evtIsSavable);
                _list.Add(e);
            }
            return(this);
        }