Ejemplo n.º 1
0
 public EmailTypeList GetAll()
 {
     _list.Clear();
     Database db = new Database("student");
     db.Command.CommandType = System.Data.CommandType.StoredProcedure;
     db.Command.CommandText = "tblEmailTypeGetAll";
     DataTable dt = db.ExecuteQuery();
     EmailType Blank = new EmailType();
     Blank.Type = "Select Phone Type";
     _list.Add(Blank);
     foreach (DataRow dr in dt.Rows)
     {
         EmailType e = new EmailType();
         e.Initialize(dr);
         e.InitializeBusinessData(dr);
         e.IsDirty = false;
         e.IsNew = false;
         e.evtIsSavable += new IsSavableHandler(s_evtIsSavable);
         _list.Add(e);
     }
     return this;
 }
Ejemplo n.º 2
0
        public EmailTypeList GetAll()
        {
            _list.Clear();
            Database db = new Database("student");

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

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