示例#1
0
		///<summary></summary>
		public static void Update(ScreenGroup Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			Crud.ScreenGroupCrud.Update(Cur);
		}
示例#2
0
		///<summary></summary>
		public static long Insert(ScreenGroup Cur) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Cur.ScreenGroupNum=Meth.GetLong(MethodBase.GetCurrentMethod(),Cur);
				return Cur.ScreenGroupNum;
			}
			return Crud.ScreenGroupCrud.Insert(Cur);
		}
示例#3
0
 ///<summary></summary>
 public static void Update(ScreenGroup Cur)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), Cur);
         return;
     }
     Crud.ScreenGroupCrud.Update(Cur);
 }
示例#4
0
 ///<summary></summary>
 public static long Insert(ScreenGroup Cur)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Cur.ScreenGroupNum = Meth.GetLong(MethodBase.GetCurrentMethod(), Cur);
         return(Cur.ScreenGroupNum);
     }
     return(Crud.ScreenGroupCrud.Insert(Cur));
 }
示例#5
0
		///<summary>This will also delete all screen items, so may need to ask user first.</summary>
		public static void Delete(ScreenGroup Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			string command="DELETE from screen WHERE ScreenGroupNum ='"+POut.Long(Cur.ScreenGroupNum)+"'";
			Db.NonQ(command);
			command="DELETE from screengroup WHERE ScreenGroupNum ='"+POut.Long(Cur.ScreenGroupNum)+"'";
			Db.NonQ(command);
		}
示例#6
0
        ///<summary>This will also delete all screen items, so may need to ask user first.</summary>
        public static void Delete(ScreenGroup Cur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), Cur);
                return;
            }
            string command = "DELETE from screen WHERE ScreenGroupNum ='" + POut.Long(Cur.ScreenGroupNum) + "'";

            Db.NonQ(command);
            command = "DELETE from screengroup WHERE ScreenGroupNum ='" + POut.Long(Cur.ScreenGroupNum) + "'";
            Db.NonQ(command);
        }
示例#7
0
文件: Screens.cs 项目: mnisl/OD
		///<summary>Updates all screens for a group with the date,prov, and location info of the current group.</summary>
		public static void UpdateForGroup(ScreenGroup ScreenGroupCur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),ScreenGroupCur);
				return;
			}
			string command = "UPDATE screen SET "
				+"ScreenDate     ="    +POut.Date  (ScreenGroupCur.SGDate)
				+",GradeSchool ='"      +POut.String(ScreenGroupCur.GradeSchool)+"'"
				+",County ='"           +POut.String(ScreenGroupCur.County)+"'"
				+",PlaceService ='"     +POut.Long   ((int)ScreenGroupCur.PlaceService)+"'"
				+",ProvNum ='"          +POut.Long   (ScreenGroupCur.ProvNum)+"'"
				+",ProvName ='"         +POut.String(ScreenGroupCur.ProvName)+"'"
				+" WHERE ScreenGroupNum = '" +ScreenGroupCur.ScreenGroupNum.ToString()+"'";
			Db.NonQ(command);
		}
示例#8
0
        ///<summary>Updates all screens for a group with the date,prov, and location info of the current group.</summary>
        public static void UpdateForGroup(ScreenGroup ScreenGroupCur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), ScreenGroupCur);
                return;
            }
            string command = "UPDATE screen SET "
                             + "ScreenDate     =" + POut.Date(ScreenGroupCur.SGDate)
                             + ",GradeSchool ='" + POut.String(ScreenGroupCur.GradeSchool) + "'"
                             + ",County ='" + POut.String(ScreenGroupCur.County) + "'"
                             + ",PlaceService ='" + POut.Long((int)ScreenGroupCur.PlaceService) + "'"
                             + ",ProvNum ='" + POut.Long(ScreenGroupCur.ProvNum) + "'"
                             + ",ProvName ='" + POut.String(ScreenGroupCur.ProvName) + "'"
                             + " WHERE ScreenGroupNum = '" + ScreenGroupCur.ScreenGroupNum.ToString() + "'";

            Db.NonQ(command);
        }
示例#9
0
        ///<summary>This will also delete all screen items, so may need to ask user first.</summary>
        public static void Delete(ScreenGroup Cur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), Cur);
                return;
            }
            string    command = "SELECT SheetNum FROM screen WHERE ScreenGroupNum=" + POut.Long(Cur.ScreenGroupNum) + " AND SheetNum!=0";
            DataTable table   = Db.GetTable(command);

            foreach (DataRow row in table.Rows)             //Delete any attached sheets if the screen gets deleted.
            {
                Sheets.Delete(PIn.Long(row["SheetNum"].ToString()));
            }
            command = "DELETE FROM screen WHERE ScreenGroupNum ='" + POut.Long(Cur.ScreenGroupNum) + "'";
            Db.NonQ(command);
            command = "DELETE FROM screengroup WHERE ScreenGroupNum ='" + POut.Long(Cur.ScreenGroupNum) + "'";
            Db.NonQ(command);
        }