public int Insert(bool isWeb = false) { if (!JPermission.CheckPermission("BusManagment.Shift.JShift.Insert")) { return(0); } ShiftTable AT = new ShiftTable(); AT.SetValueProperty(this); Code = AT.Insert(); ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory(); jHistory.Save("BusManagment.JShift", Code, 0, 0, 0, "ثبت شیفت", "", 0); return(Code); }
public bool Delete() { if (!JPermission.CheckPermission("BusManagment.Shift.JShift.Delete")) { return(false); } ShiftTable AT = new ShiftTable(); AT.SetValueProperty(this); if (AT.Delete()) { ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory(); jHistory.Save("BusManagment.JShift", AT.Code, 0, 0, 0, "حذف شیفت", "", 0); return(true); } else { return(false); } }