示例#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));
 }
示例#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);
        }
示例#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;
		}
示例#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);
        }
示例#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();
		}
示例#9
0
		private void butCancel_Click(object sender, System.EventArgs e) {
			if(IsNew) {
				AutoPayCur=null;
			}
			DialogResult=DialogResult.Cancel;
		}
示例#10
0
		private void butDelete_Click(object sender,EventArgs e) {
			AutoPayCur=null;
			if(IsNew) {
				DialogResult=DialogResult.Cancel;
				return;
			}
			DialogResult=DialogResult.OK;
		}