프로젝트

일반

사용자정보

개정판 36a31d25

ID36a31d25ce031fdc6302d558b828ee9b7ed9ed70
상위 cfa37642
하위 1f583030

유성호이(가) 약 2년 전에 추가함

issue #0000
Document 의 RefProjectID 삭제 -> RefProjectCode 로변경

Change-Id: I2cfa513df718150f19f9682624563e70574ceb5d

차이점 보기:

ID2.Manager/ID2.Manager.Controller/Controllers/DocumentController.cs
11 11
{
12 12
    public class DocumentController : BaseController
13 13
    {
14
        public IEnumerable<Documents> GetAllDocuments(string projectId, string personIncharge, string jobLevel, string documentNo, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult)
14
        public IEnumerable<Documents> GetAllDocuments(string projectCode, string personIncharge, string jobLevel, string documentNo, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult)
15 15
        {
16 16
            using (DocumentRepository rep = new DocumentRepository(this._DbConnectionStr))
17 17
            {
18
                return rep.GetAllDocuments(projectId, personIncharge, jobLevel, documentNo, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult);
18
                return rep.GetAllDocuments(projectCode, personIncharge, jobLevel, documentNo, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult);
19 19
            }
20 20
        }
21 21

  
ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs
14 14
    {
15 15
        public DocumentRepository(string connectionStr) : base(connectionStr) { }
16 16

  
17
        public IEnumerable<Documents> GetAllDocuments(string projectId, string personIncharge, string jobLevel, string documentNo, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult)
17
        public IEnumerable<Documents> GetAllDocuments(string projectCode, string personIncharge, string jobLevel, string documentNo, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult)
18 18
        {
19 19
            StringBuilder sbWhere = new StringBuilder();
20 20
            var parameters = new Dictionary<string, object>();
21
            if (!string.IsNullOrEmpty(projectId))
21
            if (!string.IsNullOrEmpty(projectCode))
22 22
            {
23
                sbWhere.Append(" and doc.RefProjectID=@RefProjectID ");
24
                parameters.Add("RefProjectID", projectId);
23
                sbWhere.Append(" and doc.RefProjectCode=@RefProjectCode ");
24
                parameters.Add("RefProjectCode", projectCode);
25 25
            }
26 26
            if (!string.IsNullOrEmpty(personIncharge))
27 27
            {
......
117 117
     [DocID]
118 118
    ,[DocumentNo]
119 119
    ,[RevisonNo]
120
    ,[RefProjectID]
120
    ,[RefProjectCode]
121 121
    ,[DocFilePath]
122 122
    ,[DocFileName]
123 123
    ,[Place]
......
166 166
     lower(newid())
167 167
    ,@DocumentNo
168 168
    ,@RevisonNo
169
    ,@RefProjectID
169
    ,@RefProjectCode
170 170
    ,@DocFilePath
171 171
    ,@DocFileName
172 172
    ,@Place
......
217 217
update dbo.Documents
218 218
set    [DocumentNo]=@DocumentNo
219 219
      ,[RevisonNo]=@RevisonNo
220
      ,[RefProjectID]=@RefProjectID
220
      ,[RefProjectCode]=@RefProjectCode
221 221
      ,[DocFilePath]=@DocFilePath
222 222
      ,[DocFileName]=@DocFileName
223 223
      ,[Place]=@Place
ID2.Manager/ID2.Manager.Data/Models/Documents.cs
20 20
        [DataMember]
21 21
        public string RevisonNo { get; set; }
22 22
        [DataMember]
23
        public string RefProjectID { get; set; }
23
        public string RefProjectCode { get; set; }
24 24
        [DataMember]
25 25
        public bool IsLatest { get; set; }
26 26
        [DataMember]
ID2.Manager/ID2.Manager/Main.Designer.cs
764 764
            gridViewCommandColumn24.Name = "AVEVALink";
765 765
            gridViewCommandColumn24.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
766 766
            gridViewCommandColumn24.Width = 70;
767
            gridViewComboBoxColumn41.FieldName = "RefProjectID";
768
            gridViewComboBoxColumn41.HeaderText = "위치";
769
            gridViewComboBoxColumn41.Name = "RefProjectID";
767
            gridViewComboBoxColumn41.FieldName = "RefProjectCode";
768
            gridViewComboBoxColumn41.HeaderText = "Area";
769
            gridViewComboBoxColumn41.Name = "RefProjectCode";
770 770
            gridViewComboBoxColumn41.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
771 771
            gridViewComboBoxColumn41.Width = 150;
772 772
            gridViewTextBoxColumn21.FieldName = "DocumentNo";
ID2.Manager/ID2.Manager/Main.cs
277 277
            informations.ProjectList.Where(x => x.GroupID.Equals(informations.ActiveProject.ProjectID)).ToList()
278 278
                                    .ForEach(x =>
279 279
                                    {
280
                                        this.radDropDownListProject.Items.Add(new RadListDataItem(x.Name, x.ProjectID));
280
                                        this.radDropDownListProject.Items.Add(new RadListDataItem(x.Name, x.Code));
281 281
                                    });
282 282
            var allProject = new RadListDataItem("== 전체 ==", string.Empty);
283 283
            this.radDropDownListProject.Items.Insert(0, allProject);
......
380 380
        {
381 381
            if (this.radDropDownListProject.SelectedValue != null)
382 382
            {
383
                string projectId = this.radDropDownListProject.SelectedValue.ToString();
383
                string projectCode = this.radDropDownListProject.SelectedValue.ToString();
384 384
                string personIncharge = this.radDropDownListPersonInCharge.SelectedValue.ToString();
385 385
                string jobLevel = this.radDropDownListJobLevel.SelectedValue.ToString();//
386 386
                string documentNo = this.radTextBoxDocumentNo.Text.Trim();
......
393 393
                string prodIsResult = this.radDropDownListProdIsResult.SelectedValue.ToString();//
394 394
                string clientIsResult = this.radDropDownListClientIsResult.SelectedValue.ToString();//
395 395

  
396
                this.documents = new DocumentController().GetAllDocuments(projectId, personIncharge, jobLevel, documentNo, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult).ToList();
396
                this.documents = new DocumentController().GetAllDocuments(projectCode, personIncharge, jobLevel, documentNo, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult).ToList();
397 397
                this.orgDocuments = JsonConvert.DeserializeObject<List<Documents>>(JsonConvert.SerializeObject(this.documents));
398 398
            }
399 399
        }
400 400

  
401 401
        public void DocumentListBinding()
402 402
        {
403
            GridViewComboBoxColumn ColProjects = this.radGridViewDocuments.Columns["RefProjectID"] as GridViewComboBoxColumn;
403
            GridViewComboBoxColumn ColProjects = this.radGridViewDocuments.Columns["RefProjectCode"] as GridViewComboBoxColumn;
404 404
            ColProjects.DataSource = informations.ProjectList.Where(x => x.GroupID.Equals(informations.ActiveProject.ProjectID)).ToList();
405 405
            ColProjects.DisplayMember = "Name";
406
            ColProjects.ValueMember = "ProjectID";
406
            ColProjects.ValueMember = "Code";
407 407

  
408 408
            var workUsers = informations.UserList.Where(x => (new string[] { "Manager", "User" }).Contains(x.Role) && string.IsNullOrEmpty(x.RefProjectID));
409 409
            var clientUsers = informations.UserList.Where(x => !string.IsNullOrEmpty(x.RefProjectID));
......
551 551
                        {
552 552
                            if (e.Row.DataBoundItem is Documents doc)
553 553
                            {
554
                                if (!string.IsNullOrWhiteSpace(this.GetProject(doc.RefProjectID).Code) && !string.IsNullOrWhiteSpace(doc.DocumentNo) && !string.IsNullOrWhiteSpace(doc.PersonInCharge))
554
                                if (!string.IsNullOrWhiteSpace(doc.RefProjectCode) && !string.IsNullOrWhiteSpace(doc.DocumentNo) && !string.IsNullOrWhiteSpace(doc.PersonInCharge))
555 555
                                {
556
                                    bool result = MarkusHelper.Start(this.GetProject(doc.RefProjectID).Code, doc.DocumentNo, doc.PersonInCharge);
556
                                    bool result = MarkusHelper.Start(doc.RefProjectCode, doc.DocumentNo, doc.PersonInCharge);
557 557
                                }
558 558
                            }
559 559
                        }
......
872 872
                               //NPS = ws.Rows[p.Row.Index].Cells[0].Value == null ? 0 : Convert.ToSingle(ws.Rows[p.Row.Index].Cells[0].Value),
873 873
                               //Thickness = p.Value == null ? 0 : Convert.ToSingle(p.Value)
874 874

  
875
                               RefProjectID = ws.Rows[p.Index].Cells[5].Value == null ? string.Empty : this.GetProject(ws.Rows[p.Index].Cells[5].Value.ToString()).Name,
875
                               RefProjectCode = ws.Rows[p.Index].Cells[5].Value == null ? string.Empty : ws.Rows[p.Index].Cells[5].Value.ToString(),
876 876
                               //Place = ws.Rows[p.Index].Cells[5].Value == null ? string.Empty : ws.Rows[p.Index].Cells[5].Value.ToString(),
877 877
                               DocumentNo = ws.Rows[p.Index].Cells[6].Value == null ? string.Empty : ws.Rows[p.Index].Cells[6].Value.ToString(),
878 878
                               PersonInCharge = ws.Rows[p.Index].Cells[7].Value == null ? string.Empty : this.GetUser(ws.Rows[p.Index].Cells[7].Value.ToString()).ID,
......
983 983
                            //templateWorksheet.Cells[rowIndex, 3].Value = doc.DocumentNo;
984 984
                            //templateWorksheet.Cells[rowIndex, 4].Value = doc.DocumentNo;
985 985
                            //templateWorksheet.Cells[rowIndex, 5].Value = doc.Place;
986
                            templateWorksheet.Cells[rowIndex, 5].Value = this.GetProject(doc.RefProjectID).Name;
986
                            templateWorksheet.Cells[rowIndex, 5].Value = doc.RefProjectCode;
987 987
                            templateWorksheet.Cells[rowIndex, 6].Value = doc.DocumentNo;
988
                            templateWorksheet.Cells[rowIndex, 7].Value = this.GetUser(doc.PersonInCharge).ID;
988
                            templateWorksheet.Cells[rowIndex, 7].Value = this.GetUser(doc.PersonInCharge).Name;
989 989
                            templateWorksheet.Cells[rowIndex, 8].Value = doc.JobLevel;
990 990
                            templateWorksheet.Cells[rowIndex, 9].Value = doc.IsTypical;
991 991
                            templateWorksheet.Cells[rowIndex, 10].Value = doc.RevisonNo;
......
1072 1072
            ColumnGroupsViewDefinition columnGroupsView = new ColumnGroupsViewDefinition();
1073 1073

  
1074 1074
            List<string> docLinkColNames = new List<string>() { "AutoCADLink", "PDFLink", "MarkupLink", "AVEVALink" };
1075
            List<string> docInfoColNames = new List<string>() { "RefProjectID", "DocumentNo", "PersonInCharge", "JobLevel", "IsTypical", "RevisonNo" };
1075
            List<string> docInfoColNames = new List<string>() { "RefProjectCode", "DocumentNo", "PersonInCharge", "JobLevel", "IsTypical", "RevisonNo" };
1076 1076
            List<string> rvToColNames = new List<string>() { "ToIsDiscussion", "ToRemarks", "ToModifier", "ToCapturePath", "ToIsMarkup" };
1077 1077
            List<string> rvFrColNames = new List<string>() { "FrReviewStatus", "FrRemarks", "FrModifier", "FrCapturePath", "FrIsMarkup" };
1078 1078
            List<string> rvEtcColNames = new List<string>() { "IsID2Work" };

내보내기 Unified diff

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