public int Insert(bool isWeb = false) { //if (!JPermission.CheckPermission("BusManagment.WorkOrder.JTariff.Insert")) // return 0; HokmeKarTable AT = new HokmeKarTable(); AT.SetValueProperty(this); Code = AT.Insert(); if (Code > 0 && !isWeb) { Nodes.DataTable.Merge(JHokmeKars.GetDataTable(Code)); } return(Code); }
public bool Delete() { // if (!JPermission.CheckPermission("BusManagment.WorkOrder.JTariff.Delete")) // return false; HokmeKarTable AT = new HokmeKarTable(); AT.SetValueProperty(this); if (AT.Delete()) { Nodes.Delete(Nodes.CurrentNode); return(true); } else { return(false); } }
public bool Update(bool isWeb = false) { //if (!JPermission.CheckPermission("BusManagment.WorkOrder.JTariff.Update")) // return false; HokmeKarTable AT = new HokmeKarTable(); AT.SetValueProperty(this); if (AT.Update()) { if (!isWeb) { Nodes.Refreshdata(Nodes.CurrentNode, JHokmeKars.GetDataTable(Code).Rows[0]); } return(true); } else { return(false); } }