Exemple #1
0
 public Training Reset()
 {
     Training aTraining = new Training();
     return aTraining;
 }
Exemple #2
0
        public Training LoadDataFromView(string txtID, string txtName, DateTime dtpDate, string txtUserID)
        {
            Training aT = new Training();
            bool sigue = true;
            try
            {
                trainID = Convert.ToInt64(txtID);
            }
            catch (Exception)
            {
                sigue = false;
            }

            if (sigue)
            {
                try
                {
                    userID = Convert.ToInt64(txtUserID);
                }
                catch (Exception)
                {
                    sigue = false;
                }
            }

            if (sigue)
            {
                trainName = txtName;
                trainDate = dtpDate;
            }
            else
                aT = aT.Reset();

            return aT;
        }