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 InitPage(string projectId)
        {
            var info = RenewalInfo.Get(projectId);
            var nego = RenewalLLNegotiation.Get(projectId);

            return(Ok(new
            {
                LLNegotiation = nego,
                USCode = info.USCode,
                Editable = ProjectInfo.IsFlowEditable(projectId, FlowCode.Renewal_LLNegotiation),
                Recallable = ProjectInfo.IsFlowRecallable(projectId, FlowCode.Renewal_LLNegotiation),
                Savable = ProjectInfo.IsFlowSavable(projectId, FlowCode.Renewal_LLNegotiation)
            }));
        }