Example #1
0
		///<summary></summary>
		public static long Insert(AccountingAutoPay pay) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				pay.AccountingAutoPayNum=Meth.GetLong(MethodBase.GetCurrentMethod(),pay);
				return pay.AccountingAutoPayNum;
			}
			return Crud.AccountingAutoPayCrud.Insert(pay);
		}
 ///<summary></summary>
 public static long Insert(AccountingAutoPay pay)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         pay.AccountingAutoPayNum = Meth.GetLong(MethodBase.GetCurrentMethod(), pay);
         return(pay.AccountingAutoPayNum);
     }
     return(Crud.AccountingAutoPayCrud.Insert(pay));
 }
Example #3
0
        ///<summary>Returns a copy of this AccountingAutoPay.</summary>
        public AccountingAutoPay Copy()
        {
            AccountingAutoPay a = new AccountingAutoPay();

            a.AccountingAutoPayNum = AccountingAutoPayNum;
            a.PayType  = PayType;
            a.PickList = PickList;
            return(a);
        }
Example #4
0
		///<summary>Converts the comma delimited list of AccountNums into an array of AccountNums.</summary>
		public static long[] GetPickListAccounts(AccountingAutoPay pay) {
			//No need to check RemotingRole; no call to db.
			string[] numArray=pay.PickList.Split(new char[] { ',' });
			ArrayList AL=new ArrayList();
			for(int i=0;i<numArray.Length;i++) {
				if(numArray[i]=="") {
					continue;
				}
				AL.Add(PIn.Long(numArray[i]));
			}
			long[] retVal=new long[AL.Count];
			AL.CopyTo(retVal);
			return retVal;
		}
Example #5
0
		///<summary>Converts the comma delimited list of AccountNums into full descriptions separated by carriage returns.</summary>
		public static string GetPickListDesc(AccountingAutoPay pay){
			//No need to check RemotingRole; no call to db.
			string[] numArray=pay.PickList.Split(new char[] { ',' });
			string retVal="";
			for(int i=0;i<numArray.Length;i++) {
				if(numArray[i]=="") {
					continue;
				}
				if(retVal!=""){
					retVal+="\r\n";
				}
				retVal+=Accounts.GetDescript(PIn.Long(numArray[i]));
			}
			return retVal;
		}
        ///<summary>Converts the comma delimited list of AccountNums into an array of AccountNums.</summary>
        public static long[] GetPickListAccounts(AccountingAutoPay pay)
        {
            //No need to check RemotingRole; no call to db.
            string[]  numArray = pay.PickList.Split(new char[] { ',' });
            ArrayList AL       = new ArrayList();

            for (int i = 0; i < numArray.Length; i++)
            {
                if (numArray[i] == "")
                {
                    continue;
                }
                AL.Add(PIn.Long(numArray[i]));
            }
            long[] retVal = new long[AL.Count];
            AL.CopyTo(retVal);
            return(retVal);
        }
        ///<summary>Converts the comma delimited list of AccountNums into full descriptions separated by carriage returns.</summary>
        public static string GetPickListDesc(AccountingAutoPay pay)
        {
            //No need to check RemotingRole; no call to db.
            string[] numArray = pay.PickList.Split(new char[] { ',' });
            string   retVal   = "";

            for (int i = 0; i < numArray.Length; i++)
            {
                if (numArray[i] == "")
                {
                    continue;
                }
                if (retVal != "")
                {
                    retVal += "\r\n";
                }
                retVal += Accounts.GetDescript(PIn.Long(numArray[i]));
            }
            return(retVal);
        }
Example #8
0
		private void butAddPay_Click(object sender,EventArgs e) {
			AccountingAutoPay autoPay=new AccountingAutoPay();
			FormAccountingAutoPayEdit FormA=new FormAccountingAutoPayEdit();
			FormA.AutoPayCur=autoPay;
			FormA.IsNew=true;
			if(FormA.ShowDialog()!=DialogResult.OK) {
				return;
			}
			payList.Add(autoPay);
			FillPayGrid();
		}
Example #9
0
		private void butCancel_Click(object sender, System.EventArgs e) {
			if(IsNew) {
				AutoPayCur=null;
			}
			DialogResult=DialogResult.Cancel;
		}
Example #10
0
		private void butDelete_Click(object sender,EventArgs e) {
			AutoPayCur=null;
			if(IsNew) {
				DialogResult=DialogResult.Cancel;
				return;
			}
			DialogResult=DialogResult.OK;
		}