示例#1
0
        public HttpResponseMessage Delete([FromUri] int id, [FromBody] int modifiedBy)
        {
            OfficeShift off = new OfficeShift();

            off.ID         = id;
            off.ModifiedBy = modifiedBy;
            return(Request.CreateResponse(HttpStatusCode.OK, off.Delete()));
        }
示例#2
0
 public HttpResponseMessage Save([FromBody] OfficeShift Shift)
 {
     if (Shift.ID == 0)
     {
         return(Request.CreateResponse(HttpStatusCode.OK, Shift.Save()));
     }
     else
     {
         return(Request.CreateResponse(HttpStatusCode.OK, Shift.Update()));
     }
 }
示例#3
0
 public HttpResponseMessage Get([FromUri] int id, [FromBody] int CompanyId)
 {
     return(Request.CreateResponse(HttpStatusCode.OK, OfficeShift.GetDetails(id, CompanyId)));
 }