Пример #1
0
        public bool Update(bool isWeb = false, bool checkpermission = true)
        {
            bool haspermission = true;

            if (checkpermission)
            {
                haspermission = ClassLibrary.JPermission.CheckPermission("AVL.Accounting.JCash.Update");
            }
            if (!haspermission)
            {
                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);
            }
        }
Пример #2
0
        public int Insert(bool checkPermission = true, bool isWeb = false)
        {
            bool hasPermission = true;

            if (checkPermission)
            {
                hasPermission = ClassLibrary.JPermission.CheckPermission("AVL.Accounting.JCash.Insert");
            }
            if (!hasPermission)
            {
                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);
        }