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