public int Insert(bool isWeb = false) { if (!JPermission.CheckPermission("BusManagment.Zone.JZone.Insert")) { return(0); } ZoneTable AT = new ZoneTable(); AT.SetValueProperty(this); Code = AT.Insert(); if (Code > 0 && !isWeb) { Nodes.DataTable.Merge(JZones.GetDataTable(Code)); } ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory(); jHistory.Save("BusManagment.JZone", Code, 0, 0, 0, "ثبت مناطق", "", 0); return(Code); }
public bool Update(bool isWeb = false) { if (!JPermission.CheckPermission("BusManagment.Zone.JZone.Update")) { return(false); } ZoneTable AT = new ZoneTable(); AT.SetValueProperty(this); if (AT.Update()) { if (!isWeb) { Nodes.Refreshdata(Nodes.CurrentNode, JZones.GetDataTable(Code).Rows[0]); } ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory(); jHistory.Save("BusManagment.JZone", AT.Code, 0, 0, 0, "ویرایش مناطق", "", 0); return(true); } else { return(false); } }