public bool Update(bool isWeb = false, bool checkPermission = true) { bool hasperission = true; if (checkPermission) { hasperission = ClassLibrary.JPermission.CheckPermission("AVL.ObjectList.JObjectList.Update"); } if (!hasperission) { return(false); } JObjectListTable AT = new JObjectListTable(); AT.SetValueProperty(this); if (AT.Update()) { if (!isWeb) { Nodes.Refreshdata(Nodes.CurrentNode, JObjectLists.GetDataTable(Code).Rows[0]); } ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory(); jHistory.Save("AVL.ObjectList.JObjectList", AT.Code, 0, 0, 0, "ویرایش متحرک", "", 0); return(true); } else { return(false); } }
public int Insert(bool isWeb = false) { if (!ClassLibrary.JPermission.CheckPermission("AVL.ObjectList.JObjectList.Insert")) { return(0); } JObjectListTable AT = new JObjectListTable(); AT.SetValueProperty(this); Code = AT.Insert(); ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory(); jHistory.Save("AVL.ObjectList.JObjectList", Code, 0, 0, 0, "ثبت متحرک", "", 0); if (Code > 0 && !isWeb) { Nodes.DataTable.Merge(JObjectLists.GetDataTable(Code)); } return(Code); }