示例#1
0
        public void DocReqistedPre(int id)
        {
            DocViewViewData viewData = new DocViewViewData() { DocData = new List<string>() };
            int iorgID = GetOrgID();
            if (id != 0)
            {
                viewData.doc = (from c in CQGJ.Doc
                                where c.DocID == id
                                select c).First();

                int i = (from c in CQGJ.Doc
                         from a in CQGJ.Attachment
                         where c.DocID == id
                         select c.Attachment.AttachmentID).First();
                viewData.lsAttachmentItem = (from d in CQGJ.AttachmentItem
                                             where d.Attachment.AttachmentID == i
                                             select d).ToList();

                string[] SecretDetail = ConfigurationManager.AppSettings.Get("SecretDetail").Split(',');
                string[] EmergercyDetail = ConfigurationManager.AppSettings.Get("EmergercyDetail").Split(',');
                string[] DocClassDetail = ConfigurationManager.AppSettings.Get("DocClassDetail").Split(',');
                string[] DocTypeDetail = ConfigurationManager.AppSettings.Get("DocTypeDetail").Split(',');
                viewData.DocData.Add(SecretDetail[viewData.doc.SecretLevel.Value-1]);//0
                viewData.DocData.Add(EmergercyDetail[viewData.doc.UrgentLevel.Value-1]);//1
                viewData.DocData.Add(DocClassDetail[viewData.doc.DocClass.Value-1]);//2
                viewData.DocData.Add(DocTypeDetail[viewData.doc.DocType.Value-1]);//3
                RenderView("DocRegister", viewData);
            }
        }
示例#2
0
        public void DocWatchTreats(int? id)
        {
            if (id != null)
            {
                DocViewViewData viewData = new DocViewViewData() { DocData = new List<string>(), DocTreats = new List<DocWatchTreatsCell>() };
                //取出公文信息
                viewData.doc = (from c in CQGJ.Doc
                                where c.DocID == id.Value
                                select c).First();
                int i = (from c in CQGJ.Doc
                         from a in CQGJ.Attachment
                         where c.DocID == id.Value
                         select c.Attachment.AttachmentID).First();
                viewData.lsAttachmentItem = (from d in CQGJ.AttachmentItem
                                             where d.Attachment.AttachmentID == i
                                             select d).ToList();

                string[] SecretDetail = ConfigurationManager.AppSettings.Get("SecretDetail").Split(',');
                string[] EmergercyDetail = ConfigurationManager.AppSettings.Get("EmergercyDetail").Split(',');
                string[] DocClassDetail = ConfigurationManager.AppSettings.Get("DocClassDetail").Split(',');
                string[] DocTypeDetail = ConfigurationManager.AppSettings.Get("DocTypeDetail").Split(',');
                viewData.DocData.Add(SecretDetail[viewData.doc.SecretLevel.Value-1]);//0
                viewData.DocData.Add(EmergercyDetail[viewData.doc.UrgentLevel.Value-1]);//1
                viewData.DocData.Add(DocClassDetail[viewData.doc.DocClass.Value-1]);//2
                viewData.DocData.Add(DocTypeDetail[viewData.doc.DocType.Value-1]);//3

                //取出公文处理信息
                var docTreats = (from dt in CQGJ.DocTreat
                                 where dt.Doc.DocID == id.Value
                                 select dt);

                bool IsAutoEnd=false;
                int TotalStatus = 0;
                foreach (var dt in docTreats)
                {
                    int thisStatus=dt.TreatType.Value;
                    viewData.DocTreats.Add(new DocWatchTreatsCell() { docTreat = dt, Org = cqgjPassport.GetOrg(ToPassportOrgCode(Convert.ToInt32(dt.OrgReference.EntityKey.EntityKeyValues[0].Value))) });
                    if(thisStatus.Equals(DocProcessStatus.Treated))
                        TotalStatus++;
                }
                if (TotalStatus == viewData.DocTreats.Count)
                {
                    IsAutoEnd = true;
                }
                viewData.IsAutoEnd = IsAutoEnd;
                RenderView("DocWatchTreatsView", viewData);
            }
        }
示例#3
0
        /// <summary>
        /// 公文处理完后的查看界面
        /// </summary>
        /// <param name="id">公文ID </param>
        public ActionResult DocTreatedView(int id)
        {
            if (id != 0)
            {
                DocViewViewData viewData = new DocViewViewData() { DocData = new List<string>() };
                int orgID = GetOrg().OrgID;
                viewData.doc = (from c in CQGJ.Doc
                                where c.DocID == id
                                select c).First();
                int ot = (int)GetOrg().OrgType;
                try
                {
                    viewData.docTreat = (from dt in CQGJ.DocTreat
                                         where dt.Doc.DocID == id && dt.Org.OrgID == orgID
                                         select dt).First();
                }
                catch
                {
                    viewData.docTreat = (from dt in CQGJ.DocTreat
                                         where dt.Doc.DocID == id
                                         select dt).First();
                }
                //找出Attachmen ID
                int i = (from c in CQGJ.Doc
                         from a in CQGJ.Attachment
                         where c.DocID == id
                         select c.Attachment.AttachmentID).First();

                viewData.lsAttachmentItem = (from d in CQGJ.AttachmentItem
                                             where d.Attachment.AttachmentID == i
                                             select d).ToList();
                string[] SecretDetail = ConfigurationManager.AppSettings.Get("SecretLevelDetail").Split(',');
                string[] EmergercyDetail = ConfigurationManager.AppSettings.Get("UrgentLevelDetail").Split(',');
                string[] DocClassDetail = ConfigurationManager.AppSettings.Get("DocClassDetail").Split(',');
                string[] TrainTypeDetail = ConfigurationManager.AppSettings.Get("TrainTypeDetail").Split(',');
                string[] DocTypeDetail = ConfigurationManager.AppSettings.Get("DocTypeDetail").Split(',');
                viewData.DocData.Add(SecretDetail[viewData.doc.SecretLevel.Value - 1]);//0
                viewData.DocData.Add(EmergercyDetail[viewData.doc.UrgentLevel.Value - 1]);//1
                viewData.DocData.Add(DocClassDetail[viewData.doc.DocClass.Value - 1]);//2
                viewData.DocData.Add(TrainTypeDetail[viewData.doc.TrainType.Value - 1]);//3
                viewData.DocData.Add(DocTypeDetail[viewData.doc.DocType.Value - 1]);//4
                return View("DocTreatedView", viewData);
            }
            return null;
        }
示例#4
0
        public void DocViewSended(int? id )
        {
            if (id != null)
            {
                DocViewViewData viewData = new DocViewViewData() { DocData=new List<string>()};

                viewData.doc = (from c in CQGJ.Doc
                                from dt in c.DocTreat
                                where c.DocID == id.Value
                                select c).First();
                //取出多个或是一个
                viewData.docTreats = (from c in CQGJ.Doc
                                     from dt in c.DocTreat
                                     where c.DocID == id.Value
                                     select dt).ToList();

                int i = (from c in CQGJ.Doc
                         from a in CQGJ.Attachment
                         where c.DocID == id.Value
                         select c.Attachment.AttachmentID).First();

                viewData.lsAttachmentItem = (from d in CQGJ.AttachmentItem
                                             where d.Attachment.AttachmentID == i
                                             select d).ToList();

                string[] SecretDetail = ConfigurationManager.AppSettings.Get("SecretDetail").Split(',');
                string[] EmergercyDetail = ConfigurationManager.AppSettings.Get("EmergercyDetail").Split(',');
                string[] DocClassDetail = ConfigurationManager.AppSettings.Get("DocClassDetail").Split(',');
                string[] ClassTypeDetail = ConfigurationManager.AppSettings.Get("ClassTypeDetail").Split(',');
                string[] DocTypeDetail = ConfigurationManager.AppSettings.Get("DocTypeDetail").Split(',');
                viewData.DocData.Add(SecretDetail[viewData.doc.SecretLevel.Value-1]);//0
                viewData.DocData.Add(EmergercyDetail[viewData.doc.UrgentLevel.Value-1]);//1
                viewData.DocData.Add(DocClassDetail[viewData.doc.DocClass.Value-1]);//2
                viewData.DocData.Add(ClassTypeDetail[viewData.doc.TrainType.Value-1]);//3
                viewData.DocData.Add(DocTypeDetail[viewData.doc.DocType.Value-1]);//4
                RenderView("DocCommonView", viewData);
            }
        }
示例#5
0
        public ActionResult DocWatchTreats(int? id)
        {
            if (id != null)
            {
                DocViewViewData viewData = new DocViewViewData() { DocData = new List<string>(), DocTreats = new List<DocWatchTreatsCell>() };
                //取出公文信息
                viewData.doc = (from c in CQGJ.Doc
                                where c.DocID == id.Value
                                select c).First();
                int i = (from c in CQGJ.Doc
                         from a in CQGJ.Attachment
                         where c.DocID == id.Value
                         select c.Attachment.AttachmentID).First();
                viewData.lsAttachmentItem = (from d in CQGJ.AttachmentItem
                                             where d.Attachment.AttachmentID == i
                                             select d).ToList();

                string[] SecretDetail = ConfigurationManager.AppSettings.Get("SecretLevelDetail").Split(',');
                string[] EmergercyDetail = ConfigurationManager.AppSettings.Get("UrgentLevelDetail").Split(',');
                string[] DocClassDetail = ConfigurationManager.AppSettings.Get("DocClassDetail").Split(',');
                string[] TrainTypeDetail = ConfigurationManager.AppSettings.Get("TrainTypeDetail").Split(',');
                string[] DocTypeDetail = ConfigurationManager.AppSettings.Get("DocTypeDetail").Split(',');
                viewData.DocData.Add(SecretDetail[viewData.doc.SecretLevel.Value - 1]);//0
                viewData.DocData.Add(EmergercyDetail[viewData.doc.UrgentLevel.Value - 1]);//1
                viewData.DocData.Add(DocClassDetail[viewData.doc.DocClass.Value - 1]);//2
                viewData.DocData.Add(TrainTypeDetail[viewData.doc.TrainType.Value - 1]);//3
                viewData.DocData.Add(DocTypeDetail[viewData.doc.DocType.Value - 1]);//4

                //取出公文处理信息
                var docTreats = (from dt in CQGJ.DocTreat
                                 where dt.Doc.DocID == id.Value
                                 select dt);

                bool IsAutoEnd = false;
                int TotalStatus = 0;
                foreach (var dt in docTreats)
                {
                    Org org = (from o in CQGJ.Org
                               from t in CQGJ.DocTreat
                               where t.TreatID == dt.TreatID
                               select t.Org).First();
                    int thisStatus = dt.TreatType.Value;
                    viewData.DocTreats.Add(new DocWatchTreatsCell() { docTreat = dt, Org = org });
                    if (thisStatus.Equals(DocProcessStatus.Treated))
                        TotalStatus++;
                }
                if (TotalStatus == viewData.DocTreats.Count)
                {
                    IsAutoEnd = true;
                }
                viewData.IsAutoEnd = IsAutoEnd;
                return View("DocWatchTreatsView", viewData);
            }
            return null;
        }