Esempio n. 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);
            }
        }
Esempio n. 2
0
        public bool Update(JDataBase pDB)
        {
            JAUTPaymentTable AT = new JAUTPaymentTable();

            AT.SetValueProperty(this);
            if (AT.Update(pDB))
            {
                Nodes.Refreshdata(Nodes.CurrentNode, JAUTPayments.GetDataTable(pDB, Code).Rows[0]);
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JAUTPayment", AT.Code, 0, 0, 0, "ویرایش سند پرداخت", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
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);
         }
     }
 }
Esempio n. 4
0
        public int Insert(JDataBase pDB, bool isWebProject)
        {
            //if (!JPermission.CheckPermission("BusManagment.Documents.JAUTPayment.Insert"))
            //   return 0;

            JAUTPaymentTable AT = new JAUTPaymentTable();

            AT.SetValueProperty(this);
            Code = AT.Insert(pDB);
            if (Code > 0)
            {
                if (!isWebProject)
                {
                    Nodes.DataTable.Merge(JAUTPayments.GetDataTable(pDB, Code));
                }
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JAUTPayment", Code, 0, 0, 0, "ثبت سند پرداخت", "", 0);
            return(Code);
        }