public object DeleteEventType(EventTypeUpdateParam PM) { try { Tbl_EventType_Master obj = db.Tbl_EventType_Master.Where(r => r.EventTypeID == PM.EventTypeID).FirstOrDefault(); if (obj.Status == 1) { obj.Status = 0; } else { obj.Status = 1; } db.SaveChanges(); return(new Result() { IsSucess = true, ResultData = "Event Type Deactivated Successfully." }); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }
public object EventTypeUpdate(EventTypeUpdateParam b) { if (b.EventType == null) { return(new Error() { IsError = true, Message = "Required Event Type" }); } var data = db.Tbl_EventType_Master.Where(r => r.EventTypeID == b.EventTypeID).FirstOrDefault(); try { Tbl_FeeType_Master obj = new Tbl_FeeType_Master(); data.EventType = b.EventType; data.ModifiedBy = null; data.ModifiedDate = System.DateTime.Today.Date; db.SaveChanges(); return(new Result() { IsSucess = true, ResultData = "Update Event Type" }); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }
public object DeleteEventType([FromBody] EventTypeUpdateParam PM) { try { EventTypeBusiness b = new EventTypeBusiness(); var Result = b.DeleteEventType(PM); return(Result); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }
public object UpdateEventType(EventTypeUpdateParam b) { try { EventTypeBusiness type = new EventTypeBusiness(); var Result = type.EventTypeUpdate(b); return(Result); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }
public object GetSingleEventType(EventTypeUpdateParam b) { try { var Event = db.ViewEventTypeLists.Where(r => r.EventTypeID == b.EventTypeID).FirstOrDefault(); return(new Result() { IsSucess = true, ResultData = Event }); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }