//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); }
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); } }
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); } }