예제 #1
0
 internal static InboundDocsView CreateInboundDocsView(InboundDocsDto dto)
 {
     return new InboundDocsView
     {
         CallerRef = dto.CallerRef,
         Cmt = dto.Cmt,
         DocStatusCode = dto.DocStatusCode,
         FileName = dto.FileName,
         HasAutoAsctedFlag = dto.HasAutoAsctedFlag,
         Id = dto.Id,
         MappedCptySn = dto.MappedCptySn,
         Sender = dto.Sender,
         SentTo = dto.SentTo,
         RcvdTs = dto.RcvdTs
     };
 }
예제 #2
0
 internal static InboundDocsDto CreateInboundDocsDto(InboundDocsView inbDocView, string newFileName = null)
 {            
     InboundDocsDto inboundDocsData = new InboundDocsDto
     {
         CallerRef = inbDocView.CallerRef,
         Cmt = inbDocView.Cmt,
         DocStatusCode = inbDocView.DocStatusCode,
         FileName = newFileName ?? inbDocView.FileName,
         HasAutoAsctedFlag = inbDocView.HasAutoAsctedFlag,
         Id = inbDocView.Id,
         MappedCptySn = inbDocView.MappedCptySn,
         Sender = inbDocView.Sender,
         SentTo = inbDocView.SentTo,
         RcvdTs = inbDocView.RcvdTs
     };
     return inboundDocsData;
 }
예제 #3
0
        public void CreateDocumentComment()
        {
            List<InboundDocsDto> inboundDocsDataList = new List<InboundDocsDto>();
            try
            {
                using (new CursorBlock(Cursors.WaitCursor))
                {
                    foreach (int rowHandle in gridViewInboundDocs.GetSelectedRows())
                    {
                        InboundDocsDto inboundDocsData = new InboundDocsDto();
                        var dr = gridViewInboundDocs.GetDataRow(rowHandle);
                        var inbDocView = CollectionHelper.CreateObjectFromDataRow<InboundDocsView>(dr);

                        inboundDocsData.CallerRef = inbDocView.CallerRef;
                        inboundDocsData.Cmt = GetInboundDocComment(inbDocView.Cmt);
                        if (inboundDocsData.Cmt == inbDocView.Cmt)
                            return; // no comment changes
                        inboundDocsData.DocStatusCode = inbDocView.DocStatusCode;
                        inboundDocsData.FileName = inbDocView.FileName;
                        inboundDocsData.Id = inbDocView.Id;
                        inboundDocsData.Sender = inbDocView.Sender;
                        inboundDocsData.SentTo = inbDocView.SentTo;

                        inboundDocsDataList.Add(inboundDocsData);
                    }

                    SubmitUpdateInboundDocRequest(inboundDocsDataList);
                }
            }
            catch (Exception ex)
            {
                LogAndDisplayException("An error occurred while updating the grid with the document comment." + Environment.NewLine +
                               "Error CNF-503 in " + FORM_NAME + ".CreateDocumentComment().", ex);
            }            
        }
예제 #4
0
        private void UpdateSentToFaxNo(string newSentToVal)
        {
            DataRow dr = null;
            //inboundUpdateRequest[] requestArray = new inboundUpdateRequest[gridViewInboundDocs.GetSelectedRows().Length];
            //int counter = 0;
            List<InboundDocsDto> inboundDocsDataList = new List<InboundDocsDto>();
            InboundDocsView inbDocView = null;
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                foreach (int rowHandle in gridViewInboundDocs.GetSelectedRows())
                {
                    //inboundUpdateRequest request = new inboundUpdateRequest();
                    InboundDocsDto inboundDocsData = new InboundDocsDto();
                    dr = gridViewInboundDocs.GetDataRow(rowHandle);
                    inbDocView = CollectionHelper.CreateObjectFromDataRow<InboundDocsView>(dr);

                    //request.CallerRef = inbDocView.CallerRef;
                    //request.Cmt = inbDocView.Cmt;
                    //request.DocStatusCode = inbDocView.DocStatusCode;
                    //request.FileName = inbDocView.FileName;
                    //request.Id = inbDocView.Id;
                    //request.Sender = inbDocView.Sender;
                    //request.SentTo = newSentToVal;
                    //requestArray[counter] = request;
                    //counter++;

                    inboundDocsData.CallerRef = inbDocView.CallerRef;
                    inboundDocsData.Cmt = inbDocView.Cmt;
                    inboundDocsData.DocStatusCode = inbDocView.DocStatusCode;
                    inboundDocsData.FileName = inbDocView.FileName;
                    inboundDocsData.Id = inbDocView.Id;
                    inboundDocsData.Sender = inbDocView.Sender;
                    inboundDocsData.SentTo = newSentToVal;
                    inboundDocsDataList.Add(inboundDocsData);
                }
                //SubmitUpdateInboundDocRequest(requestArray);
                SubmitUpdateInboundDocRequest(inboundDocsDataList);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("An error occurred while updating Sent To Transmission Address for: " + newSentToVal + "." + Environment.NewLine +
                       "Error CNF-520 in " + FORM_NAME + ".UpdateSentToFaxNo(): " + ex.Message,
                     FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }