Beispiel #1
0
        public bool DeleteDate()
        {
            JAUTDocumentTable AT = new JAUTDocumentTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                Nodes.Delete(Nodes.CurrentNode);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        public int Insert(JDataBase pDB, bool isWebProject)
        {
            //if (!JPermission.CheckPermission("BusManagment.Documents.JAUTDocument.Insert"))
            //    return 0;
            JAUTDocumentTable AT = new JAUTDocumentTable();

            AT.SetValueProperty(this);
            Code = AT.Insert(pDB);
            if (Code > 0)
            {
                if (!isWebProject)
                {
                    Nodes.DataTable.Merge(JAUTDocuments.GetDataTable(pDB, Code));
                }
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JAUTDocument", Code, 0, 0, 0, "ثبت سند", "", 0);
            return(Code);
        }
Beispiel #3
0
        public bool Delete()
        {
            if (!JPermission.CheckPermission("BusManagment.Documents.JAUTDocument.Delete"))
            {
                return(false);
            }
            JAUTDocumentTable AT = new JAUTDocumentTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                Nodes.Delete(Nodes.CurrentNode);
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JAUTDocument", AT.Code, 0, 0, 0, "حذف سند", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #4
0
        public bool CascadeDelete(JDataBase db)
        {
            JAUTDocumentTable AT = new JAUTDocumentTable();

            AT.SetValueProperty(this);
            if (JAUTDocumentDetails.Delete(db, this.Code))
            {
                if (AT.Delete(db))
                {
                    ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                    jHistory.Save("BusManagment.JAUTDocument", AT.Code, 0, 0, 0, "حذف سند و جزئیات", "", 0);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Beispiel #5
0
        public bool Update(JDataBase pDB, bool isWebProject = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Documents.JAUTDocument.Update"))
            {
                return(false);
            }
            JAUTDocumentTable AT = new JAUTDocumentTable();

            AT.SetValueProperty(this);
            if (AT.Update(pDB))
            {
                if (!isWebProject)
                {
                    Nodes.Refreshdata(Nodes.CurrentNode, JAUTDocuments.GetDataTable(pDB, Code).Rows[0]);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JAUTDocument", AT.Code, 0, 0, 0, "ویرایش سند", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }