public IHttpActionResult SaveRecord(RenewalLLNegotiationRecord record) { var nego = RenewalLLNegotiation.Get(record.RenewalLLNegotiationId); if (nego.ProcInstId > 0) { nego.Save(); } else { nego.Submit(); } if (RenewalLLNegotiationRecord.Any(e => e.Id == record.Id)) { record.LastUpdateTime = DateTime.Now; record.LastUpdateUserAccount = ClientCookie.UserCode; record.Update(); } else { record.CreateTime = DateTime.Now; record.CreateUserAccount = ClientCookie.UserCode; record.Valid = true; record.Add(); } nego.GenerateAttachment(); return(Ok()); }
public IHttpActionResult DeleteRecord(RenewalLLNegotiationRecord record) { record.Valid = false; record.Update(); return(Ok()); }