Example #1
0
        public bool Delete()
        {
            JAUTPaymentTable AT = new JAUTPaymentTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                Nodes.Delete(Nodes.CurrentNode);
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JAUTPayment", AT.Code, 0, 0, 0, "حذف سند پرداخت", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
 public bool CascadeDelete(JDataBase db)
 {
     BusManagment.Documents.JAUTDocument document1 = new BusManagment.Documents.JAUTDocument();
     document1.Code = 400000000 + Code;
     {
         if (document1.CascadeDelete(db))
         {
             BusManagment.Documents.JAUTDocument document2 = new BusManagment.Documents.JAUTDocument();
             document2.Code = 700000000 + Code;
             {
                 if (document1.CascadeDelete(db))
                 {
                     JAUTPaymentTable AT = new JAUTPaymentTable();
                     AT.SetValueProperty(this);
                     if (JAUTPaymentDetails.Delete(db, this.Code))
                     {
                         if (AT.Delete(db))
                         {
                             ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                             jHistory.Save("BusManagment.JAUTPayment", AT.Code, 0, 0, 0, "حذف سند پرداخت و جزئیات", "", 0);
                             return(true);
                         }
                         else
                         {
                             return(false);
                         }
                     }
                     else
                     {
                         return(false);
                     }
                 }
                 else
                 {
                     return(false);
                 }
             }
         }
         else
         {
             return(false);
         }
     }
 }