Esempio n. 1
0
		///<summary></summary>
		private static long Insert(SchoolClass sc) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				sc.SchoolClassNum=Meth.GetLong(MethodBase.GetCurrentMethod(),sc);
				return sc.SchoolClassNum;
			}
			return Crud.SchoolClassCrud.Insert(sc);
		}
Esempio n. 2
0
		///<summary></summary>
		private static void Update(SchoolClass sc){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),sc);
				return;
			}
			Crud.SchoolClassCrud.Update(sc);
		}
Esempio n. 3
0
		///<summary></summary>
		public SchoolClass Copy(){
			SchoolClass sc=new SchoolClass();
			sc.SchoolClassNum=SchoolClassNum;
			sc.GradYear=GradYear;
			sc.Descript=Descript;
			return sc;
		}
Esempio n. 4
0
		///<summary></summary>
		public FormSchoolClassEdit(SchoolClass classCur)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			ClassCur=classCur.Copy();
			Lan.F(this);
		}
Esempio n. 5
0
		///<summary></summary>
		public static void InsertOrUpdate(SchoolClass sc, bool isNew){
			//No need to check RemotingRole; no call to db.
			//if(IsRepeating && DateTask.Year>1880){
			//	throw new Exception(Lans.g(this,"Task cannot be tagged repeating and also have a date."));
			//}
			if(isNew){
				Insert(sc);
			}
			else{
				Update(sc);
			}
		}
Esempio n. 6
0
 ///<summary></summary>
 public static void InsertOrUpdate(SchoolClass sc, bool isNew)
 {
     //No need to check RemotingRole; no call to db.
     //if(IsRepeating && DateTask.Year>1880){
     //	throw new Exception(Lans.g(this,"Task cannot be tagged repeating and also have a date."));
     //}
     if (isNew)
     {
         Insert(sc);
     }
     else
     {
         Update(sc);
     }
 }
Esempio n. 7
0
 public static string GetDescript(SchoolClass schoolClass)
 {
     //No need to check RemotingRole; no call to db.
     return(schoolClass.GradYear + "-" + schoolClass.Descript);
 }
Esempio n. 8
0
		public static string GetDescript(SchoolClass schoolClass) {
			//No need to check RemotingRole; no call to db.
			return schoolClass.GradYear+"-"+schoolClass.Descript;
		}
Esempio n. 9
0
		private void butAdd_Click(object sender, System.EventArgs e) {
			SchoolClass cur=new SchoolClass();
			FormSchoolClassEdit FormS=new FormSchoolClassEdit(cur);
			FormS.IsNew=true;
			FormS.ShowDialog();
			if(FormS.DialogResult!=DialogResult.OK){
				return;
			}
			changed=true;
			FillList();
			listMain.SelectedIndex=-1;
		}