Exemplo n.º 1
0
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.UserDynamicDashboard.JUserDynamicDashboard.Insert"))
            {
                return(0);
            }
            UserDynamicDashboardTable AT = new UserDynamicDashboardTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0 && !isWeb)
            {
                Nodes.DataTable.Merge(JUserDynamicDashboards.GetDataTable(Code));
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JUserDynamicDashboard", Code, 0, 0, 0, "ثبت اشخاص دارنده داشبورد", "", 0);
            return(Code);
        }
Exemplo n.º 2
0
        public bool Delete(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.UserDynamicDashboard.JUserDynamicDashboard.Delete"))
            {
                return(false);
            }
            UserDynamicDashboardTable AT = new UserDynamicDashboardTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                if (!isWeb)
                {
                    Nodes.Delete(Nodes.CurrentNode);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JUserDynamicDashboard", AT.Code, 0, 0, 0, "حذف اشخاص دارنده داشبورد", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public bool Update(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.UserDynamicDashboard.JUserDynamicDashboard.Update"))
            {
                return(false);
            }
            UserDynamicDashboardTable AT = new UserDynamicDashboardTable();

            AT.SetValueProperty(this);
            if (AT.Update())
            {
                if (!isWeb)
                {
                    Nodes.Refreshdata(Nodes.CurrentNode, JUserDynamicDashboards.GetDataTable(Code).Rows[0]);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JUserDynamicDashboard", AT.Code, 0, 0, 0, "ویرایش اشخاص دارنده داشبورد", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }