示例#1
0
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.DynamicDashboard.JDynamicDashboard.Insert"))
            {
                return(0);
            }
            DynamicDashboardTable AT = new DynamicDashboardTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0 && !isWeb)
            {
                Nodes.DataTable.Merge(JDynamicDashboards.GetDataTable(Code));
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JDynamicDashboard", Code, 0, 0, 0, "ثبت کوئری داشبورد", "", 0);
            return(Code);
        }
示例#2
0
        public bool Delete(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.DynamicDashboard.JDynamicDashboard.Delete"))
            {
                return(false);
            }
            DynamicDashboardTable AT = new DynamicDashboardTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                if (!isWeb)
                {
                    Nodes.Delete(Nodes.CurrentNode);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JDynamicDashboard", AT.Code, 0, 0, 0, "حذف کوئری داشبورد", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
        public bool Update(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.DynamicDashboard.JDynamicDashboard.Update"))
            {
                return(false);
            }
            DynamicDashboardTable AT = new DynamicDashboardTable();

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