Esempio n. 1
0
        //ccc
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Line.JLine.Insert"))
            {
                return(0);
            }
            LineTable AT = new LineTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0 && !isWeb)
            {
                Nodes.DataTable.Merge(JLines.GetDataTable(Code));
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JLine", Code, 0, 0, 0, "ثبت خطوط", "", 0);
            return(Code);
        }
Esempio n. 2
0
        public bool Update(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Line.JLine.Update"))
            {
                return(false);
            }
            LineTable AT = new LineTable();

            AT.SetValueProperty(this);
            if (AT.Update())
            {
                if (!isWeb)
                {
                    Nodes.Refreshdata(Nodes.CurrentNode, JLines.GetDataTable(Code).Rows[0]);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                //jHistory.Save("BusManagment.JLine", AT.Code, 0, 0, 0, "ویرایش خطوط", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        public bool Delete(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Line.JLine.Delete"))
            {
                return(false);
            }
            LineTable AT = new LineTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                if (!isWeb)
                {
                    Nodes.Delete(Nodes.CurrentNode);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JLine", AT.Code, 0, 0, 0, "حذف خطوط", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }