예제 #1
0
파일: Document.cs 프로젝트: CoolWirya/BS
        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);
        }
예제 #2
0
파일: Document.cs 프로젝트: CoolWirya/BS
        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);
            }
        }