Beispiel #1
0
		///<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);
		}
Beispiel #2
0
		///<summary></summary>
		public static void Update(Reconcile reconcile) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),reconcile);
				return;
			}
			Crud.ReconcileCrud.Update(reconcile);
		}
Beispiel #3
0
		///<summary></summary>
		public FormReconcileEdit(Reconcile reconcileCur)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			Lan.F(this);
			ReconcileCur=reconcileCur;
		}
Beispiel #4
0
 ///<summary></summary>
 public static void Update(Reconcile reconcile)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), reconcile);
         return;
     }
     Crud.ReconcileCrud.Update(reconcile);
 }
Beispiel #5
0
 ///<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));
 }
Beispiel #6
0
		///<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;
		}
Beispiel #7
0
        ///<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);
        }
Beispiel #8
0
		///<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);
		}
Beispiel #9
0
 ///<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();
 }
Beispiel #10
0
        ///<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);
        }