예제 #1
0
 public int Update(ServDocSender_DTO entity)
 {
     senderServ.AddInputParameters("@docID", entity.docID);
     senderServ.AddInputParameters("@senderName", entity.senderName);
     senderServ.AddInputParameters("@senderSurname", entity.senderSurname);
     senderServ.AddInputParameters("@senderMiddlename", entity.senderMiddlename);
     return(senderServ.IUD("sp_ServDocSender_Update", CommandType.StoredProcedure));
 }
예제 #2
0
        public ActionResult Create(DocumentDTO DocEntity, ServiceDocumentDTO servDocEntity, ServDocSender_DTO senderEntity, ServDocAddress_DTO addressEntity, string dfGUID)
        {
            DocEntity.docContentType = (int)Enums.ContentTypes.ServDoc;
            DocumentService doc   = new DocumentService();
            long            docID = doc.Insert(DocEntity);

            servDocEntity.docID = senderEntity.docID = addressEntity.docID = docID;
            servDocServ.Insert(servDocEntity);
            servDocSender.Insert(senderEntity);
            servAddrServ.Insert(addressEntity);

            OperationToDoc_DTO optodocItem = new Srv_OperationToDoc().GetOperationToDocByPosID(1, DocEntity.docContentType);

            new DocOperationService().Insert(new DocumentOperationDTO
            {
                docID             = docID,
                userID            = Convert.ToInt32(Session["userID"]),
                fromUserID        = Convert.ToInt32(Session["userID"]),
                operationID       = optodocItem.fromid,
                operationPos      = optodocItem.positionid,
                opercode          = optodocItem.opercode,
                isActionConfirmed = 1,
                doDate            = DocEntity.docRegDate,
                docDayCount       = DocEntity.docDayCount,
                docFinishDate     = DocEntity.docFinishDate
            });
            //docOPRServ.Insert(new DocumentOperationDTO
            //{
            //    docID = docID,
            //    userID = Convert.ToInt32(Session["userID"]),
            //    fromUserID = Convert.ToInt32(Session["userID"]),
            //    operationID = 0,
            //    isActionConfirmed = 1,
            //    doDate = DocEntity.docRegDate
            //});
            attFileType.UpdateDocID(docID, dfGUID);
            return(RedirectToAction("Index", "Document"));
        }
예제 #3
0
        public ActionResult Edit(DocumentDTO DocEntity, ServiceDocumentDTO servDocEntity, ServDocSender_DTO senderEntity, ServDocAddress_DTO addressEntity, DocumentOperationDTO oprEntity)
        {
            DocumentService doc = new DocumentService();

            doc.Update(DocEntity);
            servDocServ.Update(servDocEntity);
            servDocSender.Update(senderEntity);
            servAddrServ.Update(addressEntity);
            //if (oprEntity.doResponseID > 0)
            //{
            //    docOPRServ.Update(oprEntity);
            //}
            return(RedirectToAction("Index", "Document"));
        }