Example #1
0
        public int Insert(bool isWeb = false)
        {
            if (!ClassLibrary.JPermission.CheckPermission("AVL.Accounting.JCash.Insert"))
            {
                return(0);
            }
            JCashTable AT = new JCashTable();

            AT.SetValueProperty(this);
            code = AT.Insert();


            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("AVL.Accounting.JCash", code, 0, 0, 0, "ثبت در صندوق", "", 0);

            return(code);
        }
Example #2
0
        public bool Update(bool isWeb = false)
        {
            if (!ClassLibrary.JPermission.CheckPermission("AVL.Accounting.JCash.Update"))
            {
                return(false);
            }
            JCashTable AT = new JCashTable();

            AT.SetValueProperty(this);
            if (AT.Update())
            {
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("AVL.Accounting.JCash.Update", AT.Code, 0, 0, 0, "ویرایش صندوق", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }