public ActionResult Create(DocumentDTO DocEntity, InternalDocDTO intDocEntity, string dfGUID) { DocEntity.docContentType = (int)Enums.ContentTypes.InternalDoc; long docID = doc.Insert(DocEntity); intDocEntity.docID = docID; new InternalDocService().Insert(intDocEntity); new AttachFileTypeService().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 }); return(RedirectToAction("Index", "Document")); }
public ActionResult AddOperation(DocumentOperationDTO entity) { OperationToDoc_DTO OperToDocObj = new Srv_OperationToDoc().GetOperationToDocByOprID(entity.operationID, entity.docContentType); entity.operationPos = OperToDocObj.positionid; entity.opercode = OperToDocObj.opercode; entity.fromUserID = Convert.ToInt32(Session["userID"]); entity.isActionConfirmed = 0; entity.doDate = DateTime.Now.ToString("dd/MM/yyyy"); docOpServ.Insert(entity); return(Json(new { success = true })); }
public ActionResult IcraEtdimSorgu(DocumentOperationDTO entity) { OperationToDoc_DTO OperToDocObj = new Srv_OperationToDoc().GetOperationToDocByPosID(7, entity.docContentType); entity.operationID = OperToDocObj.fromid; entity.operationPos = OperToDocObj.positionid; entity.opercode = OperToDocObj.opercode; entity.fromUserID = Convert.ToInt32(Session["userID"]); entity.isActionConfirmed = 1; entity.doDate = DateTime.Now.ToString("dd/MM/yyyy"); docOpServ.Insert(entity); new DocOperationService().CompleteOperation(entity.fromDoID, null, null); //new DocOperationService().ChangeDocumentFinishDate(entity); return(Json(Url.Action("Index", "Document"))); }
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")); }
public ActionResult Create(DocumentDTO DocEntity, CitizenDoc_DTO ctzDocEntity, string dfGUID) { int docContentType = (int)Enums.ContentTypes.CtzApp; DocEntity.docContentType = docContentType; long docID = doc.Insert(DocEntity); /// begin - insert log operation //DocOperationLog_Service docOpLogServ = new DocOperationLog_Service(); //docOpLogServ.Insert(new DocOperationLog_DTO() //{ // docID = docID, // docContentType= docContentType, // userID = Convert.ToInt32(Session["userID"]), // operationID=0 //}); /// end - insert log operation ctzDocEntity.docID = docID; ctzServ.Insert(ctzDocEntity); AttachFileTypeService attFiles = new AttachFileTypeService(); attFiles.UpdateDocID(docID, dfGUID); DocOperationService docOPRServ = new DocOperationService(); Srv_OperationToDoc optodocSrv = new Srv_OperationToDoc(); OperationToDoc_DTO optodocItem = optodocSrv.GetOperationToDocByPosID(1, docContentType); docOPRServ.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 }); return(RedirectToAction("Index", "Document")); }
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")); }