///<summary></summary> public static long Insert(Reconcile reconcile) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { reconcile.ReconcileNum=Meth.GetLong(MethodBase.GetCurrentMethod(),reconcile); return reconcile.ReconcileNum; } return Crud.ReconcileCrud.Insert(reconcile); }
///<summary></summary> public static void Update(Reconcile reconcile) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(),reconcile); return; } Crud.ReconcileCrud.Update(reconcile); }
///<summary></summary> public FormReconcileEdit(Reconcile reconcileCur) { // // Required for Windows Form Designer support // InitializeComponent(); Lan.F(this); ReconcileCur=reconcileCur; }
///<summary></summary> public static void Update(Reconcile reconcile) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), reconcile); return; } Crud.ReconcileCrud.Update(reconcile); }
///<summary></summary> public static long Insert(Reconcile reconcile) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { reconcile.ReconcileNum = Meth.GetLong(MethodBase.GetCurrentMethod(), reconcile); return(reconcile.ReconcileNum); } return(Crud.ReconcileCrud.Insert(reconcile)); }
///<summary></summary> public Reconcile Copy() { Reconcile r=new Reconcile(); r.ReconcileNum=ReconcileNum; r.AccountNum=AccountNum; r.StartingBal=StartingBal; r.EndingBal=EndingBal; r.DateReconcile=DateReconcile; r.IsLocked=IsLocked; return r; }
///<summary></summary> public Reconcile Copy() { Reconcile r = new Reconcile(); r.ReconcileNum = ReconcileNum; r.AccountNum = AccountNum; r.StartingBal = StartingBal; r.EndingBal = EndingBal; r.DateReconcile = DateReconcile; r.IsLocked = IsLocked; return(r); }
///<summary>Throws exception if Reconcile is in use.</summary> public static void Delete(Reconcile reconcile) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(),reconcile); return; } //check to see if any journal entries are attached to this Reconcile string command="SELECT COUNT(*) FROM journalentry WHERE ReconcileNum="+POut.Long(reconcile.ReconcileNum); if(Db.GetCount(command)!="0"){ throw new ApplicationException(Lans.g("FormReconcileEdit", "Not allowed to delete a Reconcile with existing journal entries.")); } command="DELETE FROM reconcile WHERE ReconcileNum = "+POut.Long(reconcile.ReconcileNum); Db.NonQ(command); }
///<summary></summary> private void butAdd_Click(object sender, System.EventArgs e) { Reconcile rec=new Reconcile(); rec.DateReconcile=DateTime.Today; rec.AccountNum=AccountNum; Reconciles.Insert(rec); FormReconcileEdit FormR=new FormReconcileEdit(rec); FormR.IsNew=true; FormR.ShowDialog(); if(FormR.DialogResult!=DialogResult.OK){ return; } FillGrid(); }
///<summary>Throws exception if Reconcile is in use.</summary> public static void Delete(Reconcile reconcile) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), reconcile); return; } //check to see if any journal entries are attached to this Reconcile string command = "SELECT COUNT(*) FROM journalentry WHERE ReconcileNum=" + POut.Long(reconcile.ReconcileNum); if (Db.GetCount(command) != "0") { throw new ApplicationException(Lans.g("FormReconcileEdit", "Not allowed to delete a Reconcile with existing journal entries.")); } command = "DELETE FROM reconcile WHERE ReconcileNum = " + POut.Long(reconcile.ReconcileNum); Db.NonQ(command); }