public int Insert(bool isWeb = false) { //if (!JPermission.CheckPermission("BusManagment.WorkOrder.JTariff.Insert")) // return 0; TariffTable AT = new TariffTable(); AT.SetValueProperty(this); Code = AT.Insert(); if (Code > 0 && !isWeb) { Nodes.DataTable.Merge(JTariffs.GetDataTable(Code)); } return(Code); }
public bool Update(bool isWeb = false) { //if (!JPermission.CheckPermission("BusManagment.WorkOrder.JTariff.Update")) // return false; TariffTable AT = new TariffTable(); AT.SetValueProperty(this); if (AT.Update()) { if (!isWeb) { Nodes.Refreshdata(Nodes.CurrentNode, JTariffs.GetDataTable(Code).Rows[0]); } return(true); } else { return(false); } }
/// <summary> /// چک میکند این شیفت در تعرفه ها استفاده شده یا نه /// </summary> /// <returns></returns> public bool CheckUsedInTariff() { return(JTariffs.GetDataTable(0, this.Code).Rows.Count > 0); }