프로젝트

일반

사용자정보

개정판 709c1971

ID709c19717f0efb8717c92cbfba084066de838ff3
상위 482f6326
하위 cd8502c2

유성호이(가) 일년 이상 전에 추가함

issue #0000
전체 유저 리스트 추가
문서 저장/수정/삭제 추가 진행

Change-Id: I828d95f415d5d360bfc039625eb7aa42fd4135c2

차이점 보기:

ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs
22 22
            return Query<Documents>(query);
23 23
        }
24 24

  
25
        public bool SetDocumentData(List<Documents> docList)
25
        public bool SetDocumentData(List<Documents> docList, List<Documents> delDocList)
26 26
        {
27 27
            bool isSuccess = false;
28 28

  
......
30 30
            {
31 31
                using (var transaction = base._DbConnection.BeginTransaction())
32 32
                {
33
                    var param = new
33
                    string query = string.Empty;
34

  
35
                    if (delDocList.Count > 0)
34 36
                    {
35
                        Cases_UID = ""
36
                    };
37
                    string query = @"
38
delete dbo.Documents where Cases_UID=@Cases_UID";
39
                    base.Execute(query, param, transaction);
37
                        string docIDList = string.Join("','", delDocList.Where(x => !string.IsNullOrEmpty(x.DocID)).Select(x => x.DocID).ToList());
38

  
39
                        if (docIDList.Length > 0)
40
                        {
41
                            query = $@"delete from dbo.Documents where Cases_UID=@Cases_UID and [DocID] in ('{docIDList}');";
42
                            base.Execute(query, transaction);
43
                        }
44
                    }
40 45

  
41 46
                    foreach (Documents doc in docList)
42 47
                    {
......
111 116
    ,@IsTypical
112 117
    ,@PersonInCharge
113 118
    ,@IsDeleted
114
    ,@RegisteredDate
119
    ,getdate()
115 120
    ,@ModifiedDate
116 121
    ,@DeletedDate
117 122
    ,@ToIsDiscussion
......
150 155
    ,@DTIsImport
151 156
    ,@DTIsRegSystem
152 157
    ,@DTRemarks
153
)";
158
);";
154 159
                        }
155 160
                        else
156 161
                        {
......
206 211
      ,[DTIsImport]
207 212
      ,[DTIsRegSystem]
208 213
      ,[DTRemarks]
209
where  [DocID]=@DocID
210
";
214
where  [DocID]=@DocID;";
211 215
                        }
212 216
                        base.Execute(query, doc, transaction);
213 217
                    }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)