Exemple #1
0
        /// <summary>
        /// 质量异议新增
        /// </summary>
        /// <param name="qmDto"></param>
        /// <returns></returns>
        public TMQ_QUALITY_MAIN QualitysInser(TMQ_QUALITY_MAIN dto)
        {
            TMQ_QUALITY_MAIN_LOG logEf = AUTOMAPING.Mapping <TMQ_QUALITY_MAIN_LOG>(dto);

            Insert(logEf);
            return(Insert(dto));
        }
        /// <summary>
        /// 客户满意度列表
        /// </summary>
        /// <returns></returns>
        public ActionResult CustEval()
        {
            TMC_CUST_EVALDTO ceDto = new TMC_CUST_EVALDTO();

            ceDto.StdMains = service.GetStdMain();
            ceDto.Start    = DateTime.Now.AddDays(-5);
            ceDto.End      = DateTime.Now.AddDays(1);
            //获取完成工差列表
            PageResult <TMC_CUST_EVAL> ef = service.GetCustEvals(ceDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            ceDto.CustEvals = MAPPING.ConvertEntityToDtoList <TMC_CUST_EVAL, TMC_CUST_EVALDTO>(ef.DataList);
            //钢种大类ID转换汉字
            if (ceDto.CustEvals != null && ceDto.CustEvals.Count > 0)
            {
                foreach (var item in ceDto.CustEvals)
                {
                    if (item.C_PROD != null)
                    {
                        SelectListItem listItem = ceDto.StdMains.FirstOrDefault(x => x.Value.Equals(item.C_PROD));
                        if (listItem != null)
                        {
                            item.C_PROD_NAME = listItem.Text;
                        }
                    }
                }
            }
            return(View(ceDto));
        }
Exemple #3
0
        public ActionResult UserManage(TS_USERDTO dto)
        {
            //获取完成工差列表
            PageResult <TS_USER> ef = service.GetUsers(dto, 1);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            dto.Users = MAPPING.ConvertEntityToDtoList <TS_USER, TS_USERDTO>(ef.DataList);
            //获取客户档案
            foreach (var item in dto.Users)
            {
                if (item.C_CUST_ID != null)
                {
                    item.CustFile = basicsService.GetCustFile(item.C_CUST_ID);
                }
                else
                {
                    item.CustFile = new TS_CUSTFILE();
                }
            }
            //角色列表
            dto.Roles = basicsService.GetRoleDropDown();
            //获取部门
            dto = service.GetDept(dto);
            return(View(dto));
        }
Exemple #4
0
        /// <summary>
        /// 质量异议新增
        /// </summary>
        /// <param name="qmDto"></param>
        public TMQ_QUALITY_MAIN QualitysInser(TMQ_QUALITY_MAINDTO qmDto)
        {
            TMQ_QUALITY_MAIN     ef    = AutoMapper.Mapper.Map <TMQ_QUALITY_MAIN>(qmDto);
            TMQ_QUALITY_MAIN_LOG logEf = AUTOMAPING.Mapping <TMQ_QUALITY_MAIN_LOG>(ef);

            Insert(logEf);
            return(Insert(ef));
        }
        public ActionResult QueryUser(TS_USERDTO uDto)
        {
            PageResult <TS_USER> ef   = service.GetUsers(uDto);
            BASEPAGE             page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            uDto.Users = MAPPING.ConvertEntityToDtoList <TS_USER, TS_USERDTO>(ef.DataList);
            return(View(uDto));
        }
        public ActionResult ComDiff(TMB_COMDIFFDTO cdDto)
        {
            //获取完成工差列表
            PageResult <TMB_COMDIFF> ef = service.GetComDiffs(cdDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            cdDto.ComDiffs = MAPPING.ConvertEntityToDtoList <TMB_COMDIFF, TMB_COMDIFFDTO>(ef.DataList);
            return(View(cdDto));
        }
        public ActionResult CustFile(TS_CUSTFILEDTO cfDto)
        {
            //获取数据字典列表
            PageResult <TS_CUSTFILE> ef = service.GetCustFiles(cfDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            cfDto.CustFiles = MAPPING.ConvertEntityToDtoList <TS_CUSTFILE, TS_CUSTFILEDTO>(ef.DataList);
            return(View(cfDto));
        }
        public ActionResult Dic(TS_DICDTO dicDto)
        {
            //获取数据字典列表
            PageResult <TS_DIC> ef = service.GetDics(dicDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            dicDto.Dics = MAPPING.ConvertEntityToDtoList <TS_DIC, TS_DICDTO>(ef.DataList.OrderBy(x => x.C_INDEX).ToList());
            return(View(dicDto));
        }
Exemple #9
0
        public ActionResult FlowInfo(TMB_FLOWINFODTO fiDto)
        {
            //获取列表
            PageResult <TMB_FLOWINFO> ef = service.FlowInfos(fiDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体转换DTO
            fiDto.FlowInfos = MAPPING.ConvertEntityToDtoList <TMB_FLOWINFO, TMB_FLOWINFODTO>(ef.DataList);
            return(View(fiDto));
        }
Exemple #10
0
        public ActionResult MenuManage(TS_MENUDTO dto)
        {
            //获取完成工差列表
            PageResult <TS_MENU> ef = service.GetMenus(dto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            dto.Menus = MAPPING.ConvertEntityToDtoList <TS_MENU, TS_MENUDTO>(ef.DataList);
            return(View(dto));
        }
Exemple #11
0
        public ActionResult ButtonManage(TS_BUTTONDTO btDto)
        {
            //获取完成工差列表
            PageResult <TS_BUTTON> ef = basicsService.GetButtons(btDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            btDto.Buttons = MAPPING.ConvertEntityToDtoList <TS_BUTTON, TS_BUTTONDTO>(ef.DataList.OrderBy(x => x.C_MENU_ID).ThenBy(x => x.N_INDEX).ToList());
            return(View(btDto));
        }
Exemple #12
0
        public ActionResult Role(TS_ROLEDTO rDto)
        {
            //获取完成工差列表
            PageResult <TS_ROLE> ef = basicsService.GetRoles(rDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            rDto.Roles = MAPPING.ConvertEntityToDtoList <TS_ROLE, TS_ROLEDTO>(ef.DataList);
            return(View(rDto));
        }
Exemple #13
0
        public ActionResult Function(TS_FUNCTIONDTO fcDto)
        {
            //获取完成工差列表
            PageResult <TS_FUNCTION> ef = basicsService.GetFunctions(fcDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            fcDto.Functions = MAPPING.ConvertEntityToDtoList <TS_FUNCTION, TS_FUNCTIONDTO>(ef.DataList);
            return(View(fcDto));
        }
        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));
        }
Exemple #15
0
        /// <summary>
        /// 查询用户
        /// </summary>
        /// <param name="queryType">查询类型1 多选 0单选</param>
        /// <param name="htmlApproveId">html审批人标记id</param>
        /// <returns></returns>
        public ActionResult QueryUser(int queryType, string htmlApproveId, string htmlApproveName)
        {
            TS_USERDTO           uDto = new TS_USERDTO();
            PageResult <TS_USER> ef   = service.GetUsers(uDto);
            BASEPAGE             page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            uDto.Users           = MAPPING.ConvertEntityToDtoList <TS_USER, TS_USERDTO>(ef.DataList);
            uDto.C_QueryType     = queryType;
            uDto.HtmlApproveId   = htmlApproveId;
            uDto.HtmlApproveName = htmlApproveName;
            return(View(uDto));
        }
        public ActionResult CustEval(TMC_CUST_EVALDTO ceDto)
        {
            ceDto.StdMains = service.GetStdMain();
            //获取完成工差列表
            PageResult <TMC_CUST_EVAL> ef = service.GetCustEvals(ceDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            ceDto.CustEvals = MAPPING.ConvertEntityToDtoList <TMC_CUST_EVAL, TMC_CUST_EVALDTO>(ef.DataList);
            return(View(ceDto));
        }
Exemple #17
0
        /// <summary>
        /// 关联客户档案
        /// </summary>
        /// <returns></returns>
        public ActionResult Relation(string id)
        {
            TS_CUSTFILEDTO cfDto = new TS_CUSTFILEDTO();

            cfDto.C_EXTEND1 = id;
            //获取数据字典列表
            PageResult <TS_CUSTFILE> ef = basicsService.GetCustFiles(cfDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            cfDto.CustFiles = MAPPING.ConvertEntityToDtoList <TS_CUSTFILE, TS_CUSTFILEDTO>(ef.DataList);
            return(View(cfDto));
        }
Exemple #18
0
        public ActionResult Relation(TS_CUSTFILEDTO cfDto)
        {
            //关联客户档案
            if (cfDto.OperationType == 1)
            {
                string msg    = "";
                int    result = service.Relation(cfDto, out msg);
                //获取数据字典列表
                PageResult <TS_CUSTFILE> ef = basicsService.GetCustFiles(cfDto);
                //获取分页数据
                BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);
                this.HttpContext.Session["Page"] = page;
                //EF实体数据转换为DTO
                cfDto.CustFiles = MAPPING.ConvertEntityToDtoList <TS_CUSTFILE, TS_CUSTFILEDTO>(ef.DataList);
                if (result == 1)
                {
                    cfDto.ResultType = 1;
                }
                else
                {
                    cfDto.ResultType = 2;
                }

                cfDto.Msg = msg;

                return(View(cfDto));
            }
            else
            {
                //获取数据字典列表
                PageResult <TS_CUSTFILE> ef = basicsService.GetCustFiles(cfDto);
                //获取分页数据
                BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);
                this.HttpContext.Session["Page"] = page;
                //EF实体数据转换为DTO
                cfDto.CustFiles = MAPPING.ConvertEntityToDtoList <TS_CUSTFILE, TS_CUSTFILEDTO>(ef.DataList);
                return(View(cfDto));
            }
        }