Beispiel #1
0
		public void SetValue(Term aTerm)
		{
			this.TermCode = aTerm.Ter_Code;
			this.TermName = aTerm.Ter_Name;
			this.TermGroup = aTerm.Ter_Group;
			this.TermStart = aTerm.Ter_YearStart;
			this.TermEnd = aTerm.Ter_YearEnd;
		}
Beispiel #2
0
        // Insert
        public bool Insert( Term aTerm )
        {
            try {
                db.Terms.InsertOnSubmit ( aTerm );
                db.SubmitChanges ( );
                return true;
            }
            catch ( Exception ex ) {

                return false;
                throw new Exception ( "TermBO.Insert" + ex.ToString ( ) );
            }
        }
Beispiel #3
0
        // update
        public bool Updata( Term aTerm )
        {
            try {
                var editObj = db.Terms.Where(b=>b.Ter_Code == aTerm.Ter_Code).FirstOrDefault();
                editObj.Ter_Name = aTerm.Ter_Name;
                editObj.Ter_Group = aTerm.Ter_Group;
                editObj.Ter_YearStart = aTerm.Ter_YearStart;
                editObj.Ter_YearEnd = aTerm.Ter_YearEnd;
                db.SubmitChanges ( );
                return true;
            }

            catch ( Exception ex ) {
                return false;
                throw new Exception ( "TermOB_Updata" + ex.ToString ( ) );
            }
        }
 partial void DeleteTerm(Term instance);
 partial void UpdateTerm(Term instance);
 partial void InsertTerm(Term instance);