Esempio n. 1
0
		public static void CreateHoursTimeRule(long emp,TimeSpan hoursPerDay) {
			TimeCardRule tcr=new TimeCardRule();
			tcr.EmployeeNum=emp;
			tcr.OverHoursPerDay=hoursPerDay;
			TimeCardRules.Insert(tcr);
			return;
		}
Esempio n. 2
0
		public static void CreateAMTimeRule(long emp,TimeSpan beforeTime) {
			TimeCardRule tcr=new TimeCardRule();
			tcr.EmployeeNum=emp;
			tcr.BeforeTimeOfDay=beforeTime;
			TimeCardRules.Insert(tcr);
			return;
		}
Esempio n. 3
0
		public static void CreatePMTimeRule(long emp,TimeSpan afterTime) {
			TimeCardRule tcr=new TimeCardRule();
			tcr.EmployeeNum=emp;
			tcr.AfterTimeOfDay=afterTime;
			TimeCardRules.Insert(tcr);
			return;
		}
Esempio n. 4
0
		///<summary></summary>
		public static void Update(TimeCardRule timeCardRule){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				Meth.GetVoid(MethodBase.GetCurrentMethod(),timeCardRule);
				return;
			}
			Crud.TimeCardRuleCrud.Update(timeCardRule);
		}
Esempio n. 5
0
		/*
		Only pull out the methods below as you need them.  Otherwise, leave them commented out.

		///<summary></summary>
		public static List<TimeCardRule> Refresh(long patNum){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetObject<List<TimeCardRule>>(MethodBase.GetCurrentMethod(),patNum);
			}
			string command="SELECT * FROM timecardrule WHERE PatNum = "+POut.Long(patNum);
			return Crud.TimeCardRuleCrud.SelectMany(command);
		}

		///<summary>Gets one TimeCardRule from the db.</summary>
		public static TimeCardRule GetOne(long timeCardRuleNum){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				return Meth.GetObject<TimeCardRule>(MethodBase.GetCurrentMethod(),timeCardRuleNum);
			}
			return Crud.TimeCardRuleCrud.SelectOne(timeCardRuleNum);
		}*/

		///<summary></summary>
		public static long Insert(TimeCardRule timeCardRule){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				timeCardRule.TimeCardRuleNum=Meth.GetLong(MethodBase.GetCurrentMethod(),timeCardRule);
				return timeCardRule.TimeCardRuleNum;
			}
			return Crud.TimeCardRuleCrud.Insert(timeCardRule);
		}
Esempio n. 6
0
 ///<summary></summary>
 public static void Update(TimeCardRule timeCardRule)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), timeCardRule);
         return;
     }
     Crud.TimeCardRuleCrud.Update(timeCardRule);
 }
Esempio n. 7
0
        /*
         * Only pull out the methods below as you need them.  Otherwise, leave them commented out.
         *
         * ///<summary></summary>
         * public static List<TimeCardRule> Refresh(long patNum){
         *      if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
         *              return Meth.GetObject<List<TimeCardRule>>(MethodBase.GetCurrentMethod(),patNum);
         *      }
         *      string command="SELECT * FROM timecardrule WHERE PatNum = "+POut.Long(patNum);
         *      return Crud.TimeCardRuleCrud.SelectMany(command);
         * }
         *
         * ///<summary>Gets one TimeCardRule from the db.</summary>
         * public static TimeCardRule GetOne(long timeCardRuleNum){
         *      if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
         *              return Meth.GetObject<TimeCardRule>(MethodBase.GetCurrentMethod(),timeCardRuleNum);
         *      }
         *      return Crud.TimeCardRuleCrud.SelectOne(timeCardRuleNum);
         * }*/

        ///<summary></summary>
        public static long Insert(TimeCardRule timeCardRule)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                timeCardRule.TimeCardRuleNum = Meth.GetLong(MethodBase.GetCurrentMethod(), timeCardRule);
                return(timeCardRule.TimeCardRuleNum);
            }
            return(Crud.TimeCardRuleCrud.Insert(timeCardRule));
        }
Esempio n. 8
0
 private void butAddRule_Click(object sender,EventArgs e)
 {
     TimeCardRule rule=new TimeCardRule();
     rule.IsNew=true;
     FormTimeCardRuleEdit FormT=new FormTimeCardRuleEdit();
     FormT.timeCardRule=rule;
     FormT.ShowDialog();
     FillRules();
     changed=true;
 }