Esempio n. 1
0
        /// <summary>
        /// 用户使用报告
        /// </summary>
        /// <returns></returns>
        public ActionResult QueryCustReport(string id)
        {
            TMC_CUST_REPORTDTO dto = new TMC_CUST_REPORTDTO();

            dto = service.GetCustReport(id);
            return(View(dto));
        }
Esempio n. 2
0
        /// <summary>
        /// 用户使用报告新增
        /// </summary>
        /// <returns></returns>
        public ActionResult CustReportInsert()
        {
            TMC_CUST_REPORTDTO crDto = new TMC_CUST_REPORTDTO();

            if (BaseUser.CustFile != null)
            {
                crDto.C_CUST_NAME = BaseUser.CustFile.C_NAME;
                crDto.C_CUST_NO   = BaseUser.CustFile.C_NO;
            }
            return(View(crDto));
        }
Esempio n. 3
0
        public ActionResult CustReport(TMC_CUST_REPORTDTO crDto)
        {
            //获取完成工差列表
            PageResult <TMC_CUST_REPORT> ef = service.GetCustReports(crDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            crDto.CustReports = MAPPING.ConvertEntityToDtoList <TMC_CUST_REPORT, TMC_CUST_REPORTDTO>(ef.DataList);
            return(View(crDto));
        }
Esempio n. 4
0
 public ActionResult CustReportInsert(TMC_CUST_REPORTDTO crDto)
 {
     if (!ModelState.IsValid)
     {
         return(View(crDto));
     }
     crDto.C_EMP_ID   = BaseUser.Id;
     crDto.C_EMP_NAME = BaseUser.Name;
     crDto.D_MOD_DT   = DateTime.Now;
     crDto.ResultType = 1;
     service.CustReportInsert(crDto);
     return(View(crDto));
 }