Esempio n. 1
0
		///<summary></summary>
		public static void Update(AutoCodeCond Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			Crud.AutoCodeCondCrud.Update(Cur);
		}
Esempio n. 2
0
		///<summary></summary>
		public static long Insert(AutoCodeCond Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Cur.AutoCodeCondNum=Meth.GetLong(MethodBase.GetCurrentMethod(),Cur);
				return Cur.AutoCodeCondNum;
			}
			return Crud.AutoCodeCondCrud.Insert(Cur);
		}
Esempio n. 3
0
		///<summary></summary>
		public static void Delete(AutoCodeCond Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
			}
			string command= "DELETE from autocodecond WHERE autocodecondnum = '"
				+POut.Long(Cur.AutoCodeCondNum)+"'";
			Db.NonQ(command);
		}
Esempio n. 4
0
 ///<summary></summary>
 public static long Insert(AutoCodeCond Cur)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Cur.AutoCodeCondNum = Meth.GetLong(MethodBase.GetCurrentMethod(), Cur);
         return(Cur.AutoCodeCondNum);
     }
     return(Crud.AutoCodeCondCrud.Insert(Cur));
 }
Esempio n. 5
0
 ///<summary></summary>
 public static void Update(AutoCodeCond Cur)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), Cur);
         return;
     }
     Crud.AutoCodeCondCrud.Update(Cur);
 }
Esempio n. 6
0
        ///<summary></summary>
        public static void Delete(AutoCodeCond Cur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), Cur);
                return;
            }
            string command = "DELETE from autocodecond WHERE autocodecondnum = '" + POut.Long(Cur.AutoCodeCondNum) + "'";

            Db.NonQ(command);
        }
Esempio n. 7
0
		private void butOK_Click(object sender, System.EventArgs e) {
			if(textADA.Text==""){
			  MessageBox.Show(Lan.g(this,"Code cannot be left blank."));
        listConditions.SelectedIndex=-1;
				FillList();
				return;
      }
      AutoCodeItemCur.CodeNum=ProcedureCodes.GetCodeNum(textADA.Text);
      if(IsNew){
        AutoCodeItems.Insert(AutoCodeItemCur);
      }
      else{
        AutoCodeItems.Update(AutoCodeItemCur);
      } 
      AutoCodeConds.DeleteForItemNum(AutoCodeItemCur.AutoCodeItemNum);
      for(int i=0;i<listConditions.SelectedIndices.Count;i++){
        AutoCodeCond AutoCodeCondCur=new AutoCodeCond();
        AutoCodeCondCur.AutoCodeItemNum=AutoCodeItemCur.AutoCodeItemNum;
        AutoCodeCondCur.Cond=(AutoCondition)listConditions.SelectedIndices[i];
        AutoCodeConds.Insert(AutoCodeCondCur); 
      }
      DialogResult=DialogResult.OK;
		}