///<summary></summary>
		public static long Insert(LabTurnaround lab) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				lab.LabTurnaroundNum=Meth.GetLong(MethodBase.GetCurrentMethod(),lab);
				return lab.LabTurnaroundNum;
			}
			return Crud.LabTurnaroundCrud.Insert(lab);
		}
Beispiel #2
0
 ///<summary></summary>
 public static long Insert(LabTurnaround lab)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         lab.LabTurnaroundNum = Meth.GetLong(MethodBase.GetCurrentMethod(), lab);
         return(lab.LabTurnaroundNum);
     }
     return(Crud.LabTurnaroundCrud.Insert(lab));
 }
Beispiel #3
0
        public LabTurnaround Copy()
        {
            LabTurnaround l = new LabTurnaround();

            l.LabTurnaroundNum = LabTurnaroundNum;
            l.LaboratoryNum    = LaboratoryNum;
            l.Description      = Description;
            l.DaysPublished    = DaysPublished;
            l.DaysActual       = DaysActual;
            return(l);
        }
		///<summary></summary>
		public static List<LabTurnaround> GetForLab(long laboratoryNum) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetObject<List<LabTurnaround>>(MethodBase.GetCurrentMethod(),laboratoryNum);
			}
			string command="SELECT * FROM labturnaround WHERE LaboratoryNum="+POut.Long(laboratoryNum);
			DataTable table=Db.GetTable(command);
			List<LabTurnaround> retVal=new List<LabTurnaround>();
			LabTurnaround lab;
			for(int i=0;i<table.Rows.Count;i++) {
				lab=new LabTurnaround();
				lab.LabTurnaroundNum= PIn.Long   (table.Rows[i][0].ToString());
				lab.LaboratoryNum   = PIn.Long   (table.Rows[i][1].ToString());
				lab.Description     = PIn.String(table.Rows[i][2].ToString());
				lab.DaysPublished   = PIn.Int   (table.Rows[i][3].ToString());
				lab.DaysActual      = PIn.Int   (table.Rows[i][4].ToString());
				retVal.Add(lab);
			}
			return retVal;
		}
Beispiel #5
0
        ///<summary></summary>
        public static List <LabTurnaround> GetForLab(long laboratoryNum)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <List <LabTurnaround> >(MethodBase.GetCurrentMethod(), laboratoryNum));
            }
            string               command = "SELECT * FROM labturnaround WHERE LaboratoryNum=" + POut.Long(laboratoryNum);
            DataTable            table   = Db.GetTable(command);
            List <LabTurnaround> retVal  = new List <LabTurnaround>();
            LabTurnaround        lab;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                lab = new LabTurnaround();
                lab.LabTurnaroundNum = PIn.Long(table.Rows[i][0].ToString());
                lab.LaboratoryNum    = PIn.Long(table.Rows[i][1].ToString());
                lab.Description      = PIn.String(table.Rows[i][2].ToString());
                lab.DaysPublished    = PIn.Int(table.Rows[i][3].ToString());
                lab.DaysActual       = PIn.Int(table.Rows[i][4].ToString());
                retVal.Add(lab);
            }
            return(retVal);
        }