public int Insert(bool isWeb = false) { //if (!JPermission.CheckPermission("BusManagment.Line.JLine.Insert")) // return 0; LineServicesTable AT = new LineServicesTable(); AT.SetValueProperty(this); Code = AT.Insert(); if (Code > 0 && !isWeb) { Nodes.DataTable.Merge(JLineServicess.GetDataTable(Code)); } //ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory(); //jHistory.Save("BusManagment.JLine", Code, 0, 0, 0, "ثبت خطوط", "", 0); return(Code); }
public bool Update(bool isWeb = false) { //if (!JPermission.CheckPermission("BusManagment.Line.JLine.Update")) // return false; LineServicesTable AT = new LineServicesTable(); AT.SetValueProperty(this); if (AT.Update()) { if (!isWeb) { Nodes.Refreshdata(Nodes.CurrentNode, JLineServicess.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); } }