Пример #1
0
		///<summary></summary>
		public static void Update(ProcButtonItem item) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),item);
				return;
			}
			Crud.ProcButtonItemCrud.Update(item);
		}
Пример #2
0
		///<summary>Must have already checked procCode for nonduplicate.</summary>
		public static long Insert(ProcButtonItem item) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				item.ProcButtonItemNum=Meth.GetLong(MethodBase.GetCurrentMethod(),item);
				return item.ProcButtonItemNum;
			}
			return Crud.ProcButtonItemCrud.Insert(item);
		}
Пример #3
0
		///<summary></summary>
		public static void Delete(ProcButtonItem item) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),item);
				return;
			}
			string command="DELETE FROM procbuttonitem WHERE ProcButtonItemNum = '"+POut.Long(item.ProcButtonItemNum)+"'";
			Db.NonQ(command);
		}
Пример #4
0
 ///<summary></summary>
 public static void Update(ProcButtonItem item)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), item);
         return;
     }
     Crud.ProcButtonItemCrud.Update(item);
 }
Пример #5
0
 ///<summary>Must have already checked procCode for nonduplicate.</summary>
 public static long Insert(ProcButtonItem item)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         item.ProcButtonItemNum = Meth.GetLong(MethodBase.GetCurrentMethod(), item);
         return(item.ProcButtonItemNum);
     }
     return(Crud.ProcButtonItemCrud.Insert(item));
 }
Пример #6
0
		///<summary></summary>
		public ProcButtonItem Copy() {
			ProcButtonItem p=new ProcButtonItem();
			p.ProcButtonItemNum=ProcButtonItemNum;
			p.ProcButtonNum=ProcButtonNum;
			//p.OldCode=OldCode;
			p.AutoCodeNum=AutoCodeNum;
			p.CodeNum=CodeNum;
			return p;
		}
Пример #7
0
        ///<summary></summary>
        public ProcButtonItem Copy()
        {
            ProcButtonItem p = new ProcButtonItem();

            p.ProcButtonItemNum = ProcButtonItemNum;
            p.ProcButtonNum     = ProcButtonNum;
            p.ADACode           = ADACode;
            p.AutoCodeNum       = AutoCodeNum;
            return(p);
        }
Пример #8
0
        ///<summary></summary>
        public ProcButtonItem Copy()
        {
            ProcButtonItem p = new ProcButtonItem();

            p.ProcButtonItemNum = ProcButtonItemNum;
            p.ProcButtonNum     = ProcButtonNum;
            //p.OldCode=OldCode;
            p.AutoCodeNum = AutoCodeNum;
            p.CodeNum     = CodeNum;
            return(p);
        }
Пример #9
0
        ///<summary></summary>
        public static void Delete(ProcButtonItem item)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), item);
                return;
            }
            string command = "DELETE FROM procbuttonitem WHERE ProcButtonItemNum = '" + POut.Long(item.ProcButtonItemNum) + "'";

            Db.NonQ(command);
        }
Пример #10
0
	 	private void butOK_Click(object sender, System.EventArgs e) {
      if(textDescript.Text==""){
				MessageBox.Show(Lan.g(this,"You must type in a description."));
				return; 
      }
			if(listADA.Items.Count==0  && listAutoCodes.SelectedIndices.Count==0){
        MessageBox.Show(Lan.g(this,"You must pick at least one Auto Code or Procedure Code."));
        return;
      }
      ProcButtonCur.Description=textDescript.Text;
			if(ProcButtonCur.Category != DefC.Short[(int)DefCat.ProcButtonCats][comboCategory.SelectedIndex].DefNum){
				//This will put it at the end of the order in the new category
				ProcButtonCur.ItemOrder
					=ProcButtons.GetForCat(DefC.Short[(int)DefCat.ProcButtonCats][comboCategory.SelectedIndex].DefNum).Length;
			}
			ProcButtonCur.Category=DefC.Short[(int)DefCat.ProcButtonCats][comboCategory.SelectedIndex].DefNum;
			ProcButtonCur.ButtonImage=POut.Bitmap((Bitmap)pictureBox.Image,System.Drawing.Imaging.ImageFormat.Png);
      if(IsNew){
        ProcButtonCur.ItemOrder=ProcButtons.List.Length;        
        ProcButtons.Insert(ProcButtonCur);
      }
      else{
        ProcButtons.Update(ProcButtonCur);
      }
      ProcButtonItems.DeleteAllForButton(ProcButtonCur.ProcButtonNum);
			ProcButtonItem item;
      for(int i=0;i<listADA.Items.Count;i++){
        item=new ProcButtonItem();
        item.ProcButtonNum=ProcButtonCur.ProcButtonNum;
        item.CodeNum=ProcedureCodes.GetCodeNum(listADA.Items[i].ToString());    
        ProcButtonItems.Insert(item);
      }
      for(int i=0;i<listAutoCodes.SelectedIndices.Count;i++){
        item=new ProcButtonItem();
        item.ProcButtonNum=ProcButtonCur.ProcButtonNum;
        item.AutoCodeNum=AutoCodeC.ListShort[listAutoCodes.SelectedIndices[i]].AutoCodeNum;
        ProcButtonItems.Insert(item);
      }
      DialogResult=DialogResult.OK;    
		}