コード例 #1
0
ファイル: OutDocController.cs プロジェクト: weedkiller/dmnew
        public ActionResult Create(DocumentDTO DocEntity, OutDoc_DTO outDocEntity, string dfGUID)
        {
            DocEntity.docContentType = (int)Enums.ContentTypes.OutDoc;

            long docID = doc.Insert(DocEntity);

            outDocEntity.docID = docID;

            outDocServ.Insert(outDocEntity);

            //update DocID by GUID on submit
            AttachFileTypeService attFiles = new AttachFileTypeService();

            attFiles.UpdateDocID(docID, dfGUID);

            //update DocID by GUID on submit
            ODTOServ.UpdateDocID(docID, dfGUID);


            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
            });

            //DocOperationService docOPRServ = new DocOperationService();
            //docOPRServ.Insert(new DocumentOperationDTO
            //{
            //    docID = docID,
            //    userID = Convert.ToInt32(Session["userID"]),
            //    fromUserID = Convert.ToInt32(Session["userID"]),
            //    operationID = 0,
            //    isActionConfirmed = 1,
            //    doDate = DocEntity.docRegDate
            //});

            return(RedirectToAction("Index", "Document"));
        }
コード例 #2
0
ファイル: OutDoc_Service.cs プロジェクト: weedkiller/dmnew
 public int UpdateByDocID(OutDoc_DTO entity)
 {
     outDoc.AddInputParameters("@docID", entity.docID);
     outDoc.AddInputParameters("@countryID", entity.countryID);
     outDoc.AddInputParameters("@cityID", entity.cityID);
     outDoc.AddInputParameters("@townID", entity.townID);
     outDoc.AddInputParameters("@name", entity.name);
     outDoc.AddInputParameters("@surname", entity.surname);
     outDoc.AddInputParameters("@middlename", entity.middlename);
     outDoc.AddInputParameters("@voen", entity.voen);
     outDoc.AddInputParameters("@fulladdress", entity.fulladdress);
     outDoc.AddInputParameters("@tematikaID", entity.tematikaID);
     outDoc.AddInputParameters("@relatedDocNo", entity.relatedDocNo);
     outDoc.AddInputParameters("@relatedDocRegDate", entity.relatedDocRegDate);
     return(outDoc.IUD("sp_OutDocument_Update", CommandType.StoredProcedure));
 }
コード例 #3
0
ファイル: OutDocController.cs プロジェクト: weedkiller/dmnew
 public ActionResult Edit(DocumentDTO DocEntity, OutDoc_DTO outDocEntity)
 {
     doc.Update(DocEntity);
     outDocServ.UpdateByDocID(outDocEntity);
     return(RedirectToAction("Index", "Document"));
 }