Esempio n. 1
0
        /// <summary>
        /// 查看详细信息
        /// </summary>
        /// <param name="officeId">办公编码</param>
        /// <returns></returns>
        public ActionResult OfficeDetail(int officeId)
        {
            BLL.Office.Office office = new BLL.Office.Office();

            TOffice cot = office.GetOffice(officeId);

            this.ViewData["entity"]   = cot;
            this.ViewData["officeId"] = officeId;
            this.ViewData["title"]    = cot.标题;
            this.ViewData["type"]     = cot.办公类型编码;

            //this.ViewData["pageNumber"] = pageNumber;
            //this.ViewData["startTime"] = startTime;
            //this.ViewData["_type"] = type;
            //this.ViewData["_title"] = title; //查询条件中的标题
            //this.ViewData["_writer"] = writer == string.Empty ? "" : writer; //查询条件中的作者

            if (cot.发送类型编码 == 1)
            {
                this.ViewData["receive"] = cot.接收人;
            }
            else if (cot.发送类型编码 == 2)
            {
                this.ViewData["receive"] = cot.接收部门;
            }
            else
            {
                this.ViewData["receive"] = cot.接收人;
            }
            this.ViewData["content"] = cot.内容;

            Anchor.FA.BLL.Office.Office.UpdateRec(officeId, CurrentUser.ID.ToString());
            return(View());
        }
Esempio n. 2
0
        /// <summary>
        /// 编辑页面
        /// </summary>
        /// <param name="id">办公编码</param>
        /// <param name="type">办公类型编码</param>
        /// <returns></returns>
        public ActionResult OfficeEdit(int pageNumber, int?officeId, string type, string startTime, string endTime, string title, string writer)
        {
            BLL.Office.Office office = new BLL.Office.Office();

            this.ViewData["pageNumber"] = pageNumber;
            this.ViewData["startTime"]  = startTime;
            //this.ViewData["endTime"] = endTime;
            this.ViewData["_type"]   = type;
            this.ViewData["_title"]  = title;  //查询条件中的标题
            this.ViewData["_writer"] = writer; //查询条件中的作者姓名

            TOffice cot = office.GetOffice(officeId);

            this.ViewData["entity"]   = cot;
            this.ViewData["title"]    = cot.标题;
            this.ViewData["content"]  = cot.内容;
            this.ViewData["sendType"] = officeId == null ? 1 : cot.发送类型编码;
            this.ViewData["officeId"] = cot.编码;
            this.ViewData["receive"]  = cot.接收部门编码;

            this.ViewData["type"]     = cot.办公类型编码;
            this.ViewData["writerID"] = officeId == null?User.Identity.Name.Split('|')[0] : cot.发送人编码; //作者ID

            this.ViewData["writer"] = officeId == null?User.Identity.Name.Split('|')[1] : cot.作者;      //作者姓名

            this.ViewData["receivePerN"] = cot.接收人编码;
            this.ViewData["receivePer"]  = cot.接收人;
            return(View());
        }