コード例 #1
0
        public SyncProjectBean DescribleSyncProjectBean(List<Projects> localChanges)
        {

            SyncProjectBean projectBean = new SyncProjectBean();
            foreach (var project in localChanges)
            {
                if (project.IsLocalAdded())
                {
                    projectBean.Add.Add(ConvertLocalToServer(project));
                }
                else if (project.IsLocalUpdated())
                {
                    projectBean.Update.Add(ConvertLocalToServer(project));
                }
                else if (project.IsLocalDeleted())
                {
                    projectBean.Delete.Add(project.SId);
                }

            }
            return projectBean;
        }
コード例 #2
0
ファイル: Communicator.cs プロジェクト: fqncom/tomcraporigami
 /// <summary>
 /// 更新Projects
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public async Task<BatchUpdateResult> BatchUpdateProject(SyncProjectBean data)
 {
     return await HttpHelper.PostForObject<BatchUpdateResult>(GetUri("/api/v2/batch/project"), data);
     //return (BatchUpdateResult)getRestTemplate().postForObject(getUrl("/api/v2/batch/project"), data, 
     //BatchUpdateResult.class, new Object[0]);
 }