Ejemplo n.º 1
0
        public ActionResult SelectCXSummary(BsgridPage bsgridPage)//选择信息
        {
            var listGoods = (from tbCXSummary in MyModels.S_CXSummaryList
                             orderby tbCXSummary.CXSummaryID
                             select new CXSummaryVo
            {
                CXSummaryID = tbCXSummary.CXSummaryID,
                JiLuBianHao = tbCXSummary.JiLuBianHao,
                ZuoFeiShuLiang = tbCXSummary.ZuoFeiShuLiang,
                HuiYuanXinMing = tbCXSummary.HuiYuanXinMing,
            });
            int intTotalRow = listGoods.Count();                                                                            //总行数
            List <CXSummaryVo> listNotices = listGoods.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <CXSummaryVo> bsgrid = new Bsgrid <CXSummaryVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public ActionResult SelectMembershipCardInf(BsgridPage bsgridPage)//选择卡信息
        {
            var listGoods = (from tbMembershipCardInfo in MyModels.S_MembershipCardInfoList
                             orderby tbMembershipCardInfo.MembershipCardInfoID
                             select new MembershipCardInfoVo
            {
                MembershipCardInfoID = tbMembershipCardInfo.MembershipCardInfoID,
                CardNumber = tbMembershipCardInfo.CardNumber,
                StartCardNbumer = tbMembershipCardInfo.StartCardNbumer,
                EndCardNber = tbMembershipCardInfo.EndCardNber,
            });
            int intTotalRow = listGoods.Count();                                                                                     //总行数
            List <MembershipCardInfoVo> listNotices = listGoods.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <MembershipCardInfoVo> bsgrid = new Bsgrid <MembershipCardInfoVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 查询定价规则
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult SelectGoodsMoneyRule(BsgridPage bsgridPage)
        {
            var linqItme = from tbGoodsMoneyRule in MyModels.S_GoodsMoneyRuleList
                           orderby tbGoodsMoneyRule.GoodsMoneyRuleID
                           select tbGoodsMoneyRule;
            //查询总行数
            int intTotalRow = linqItme.Count();

            //使用Skip...Take...必须使用orderby
            List <S_GoodsMoneyRuleList> listnGoodsMoneyRule = linqItme
                                                              .Skip(bsgridPage.GetStartIndex())
                                                              .Take(bsgridPage.pageSize)
                                                              .ToList();
            //实例化 Bsgrid的返回实体类
            Bsgrid <S_GoodsMoneyRuleList> bsgrid = new Bsgrid <S_GoodsMoneyRuleList>();

            bsgrid.success   = true;                //返回状态
            bsgrid.totalRows = intTotalRow;         //总行数
            bsgrid.curPage   = bsgridPage.curPage;  //当前页
            bsgrid.data      = listnGoodsMoneyRule; //当前页的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 查询打印订货清单
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult ChaXunDaYing(BsgridPage bsgridPage)
        {
            var listStock = (from tbOrderForm in MyModels.B_OrderFormList
                             join tbOrderFormPact in MyModels.B_OrderFormPactList on tbOrderForm.OrderFormPactID equals tbOrderFormPact.OrderFormPactID
                             join tbOrderFormType in MyModels.S_OrderFormTypeList on tbOrderForm.OrderFormTypeID equals tbOrderFormType.OrderFormTypeID
                             orderby tbOrderForm.OrderFormID
                             select new Vo.Goods
            {
                OrderFormID = tbOrderForm.OrderFormID,
                OrderNumber = tbOrderForm.OrderNumber,
                OrderFormPactID = tbOrderFormPact.OrderFormPactID,
                ContractNumber = tbOrderFormPact.ContractNumber,
                ReleaseTimeStr = tbOrderFormPact.ValidTip.ToString(),
                ReleaseTimeStrr = tbOrderFormPact.ValidBegin.ToString(),
                ReleaseTimeStrrr = tbOrderForm.OrderGoodsData.ToString(),
                Place = tbOrderForm.Place,
                DeliveryFashion = tbOrderForm.DeliveryFashion,
                Value = tbOrderForm.Value,
                ExpensesOTtaxation = tbOrderForm.ExpensesOTtaxation,
                ValueTotal = tbOrderForm.ValueTotal,
                OrderFormTypeID = tbOrderFormType.OrderFormTypeID,
                OrderFormTypeName = tbOrderFormType.OrderFormTypeName,
                Register = tbOrderForm.Register,
                ReleaseTimeStrf = tbOrderForm.RegisterTime.ToString(),
                CheckRen = tbOrderForm.CheckRen,
                ReleaseTimeStrd = tbOrderForm.Checktime.ToString(),
                ConsigneeNot = tbOrderForm.ConsigneeNot,
            });
            int          intTotalRow = listStock.Count();//总行数
            List <Goods> listNotices = listStock.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();

            Bsgrid <Goods> bsgrid = new Bsgrid <Goods>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 查询用户登录信息
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="UserNameID"></param>
        /// <param name="PostBoxID"></param>
        /// <returns></returns>
        public ActionResult UserLoginDetail(BsgridPage bsgridPage, string UserNameID, string PostBoxID)
        {
            var notict = from tbUserLoginDetail in myDYXTEntities.B_UserLoginDetailTable
                         join tbAccount in myDYXTEntities.B_AccountTable on tbUserLoginDetail.AccountID equals tbAccount.AccountID
                         join tbuser in myDYXTEntities.B_UserTable on tbAccount.AccountID equals tbuser.AccountID
                         select new B_UserLoginDetailVo
            {
                UserLoginDetailID = tbUserLoginDetail.UserLoginDetailID,
                UserName          = tbuser.UserName,
                PostBox           = tbUserLoginDetail.PostBox,
                LoginFrequency    = tbUserLoginDetail.LoginFrequency,
                StrRegisterTime   = tbUserLoginDetail.RegisterTime.ToString(),
                StrlastLoginTime  = tbUserLoginDetail.lastLoginTime.ToString(),
                lastLoginIP       = tbUserLoginDetail.lastLoginIP,
                StrEndLoginTime   = tbUserLoginDetail.EndLoginTime.ToString(),
                EndLogin          = tbUserLoginDetail.EndLogin
            };

            if (!string.IsNullOrEmpty(UserNameID))
            {
                notict = notict.Where(n => n.UserName.Contains(UserNameID));
            }
            if (!string.IsNullOrEmpty(PostBoxID))
            {
                notict = notict.Where(n => n.PostBox.Contains(PostBoxID));
            }
            int totalRow = notict.Count();
            List <B_UserLoginDetailVo> notices = notict.OrderBy(p => p.UserLoginDetailID).
                                                 Skip(bsgridPage.GetStartIndex()).
                                                 Take(bsgridPage.pageSize).
                                                 ToList();
            Bsgrid <B_UserLoginDetailVo> bsgrid = new Bsgrid <B_UserLoginDetailVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = notices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 查询使用对象
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult SelectApplyTargetID(BsgridPage bsgridPage)
        {
            var linqItme = from tbApplyTarget in MyModels.S_ApplyTargetList
                           orderby tbApplyTarget.ApplyTargetID
                           select tbApplyTarget;
            //查询总行数
            int intTotalRow = linqItme.Count();
            //查询公告类型列表
            //使用Skip...Take...必须使用orderby
            List <S_ApplyTargetList> listnTypeTables = linqItme
                                                       .Skip(bsgridPage.GetStartIndex())
                                                       .Take(bsgridPage.pageSize)
                                                       .ToList();
            //实例化 Bsgrid的返回实体类
            Bsgrid <S_ApplyTargetList> bsgrid = new Bsgrid <S_ApplyTargetList>();

            bsgrid.success   = true;               //返回状态
            bsgrid.totalRows = intTotalRow;        //总行数
            bsgrid.curPage   = bsgridPage.curPage; //当前页
            bsgrid.data      = listnTypeTables;    //当前页的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 查询数据
        /// </summary>
        /// <returns></returns>
        //public ActionResult ChaXunShuXing()
        //{
        //    string strJsonNewGoodsManage = MyModels.S_TheCardsbranchList.ToList().GetJSONTreeData1
        //        ("TheCardsbranchID", "TheCardsbranchMC", "S_TheCardsbranchID");
        //    return Content(strJsonNewGoodsManage);
        //}


        #endregion

        #region 信息获取
        public ActionResult SelectTheCardsbranch(BsgridPage bsgridPage)//选择信息
        {
            var listGoods = (from tbAreaCode in MyModels.S_TheCardsbranchList
                             orderby tbAreaCode.TheCardsbranchID
                             select new TheCardsbranchVo
            {
                TheCardsbranchID = tbAreaCode.TheCardsbranchID,
                TheCardsbranchMC = tbAreaCode.TheCardsbranchMC,
                CodeRule = tbAreaCode.CodeRule,
                Code = tbAreaCode.Code,
            });
            int intTotalRow = listGoods.Count();                                                                                 //总行数
            List <TheCardsbranchVo> listNotices = listGoods.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <TheCardsbranchVo> bsgrid = new Bsgrid <TheCardsbranchVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
        /// <summary>
        /// 查询类型
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult selectNotictype(BsgridPage bsgridPage)
        {
            var notict = from tbNoticeType in myDYXTEntities.B_NoticeTypeTable
                         select new NoictVo
            {
                NoticeTypeID   = tbNoticeType.NoticeTypeID,
                NoticeTypeName = tbNoticeType.NoticeTypeName,
                Byname         = tbNoticeType.Byname
            };
            int            totalRow = notict.Count();
            List <NoictVo> notices  = notict.OrderByDescending(p => p.NoticeTypeID).
                                      Skip(bsgridPage.GetStartIndex()).
                                      Take(bsgridPage.pageSize).
                                      ToList();
            Bsgrid <NoictVo> bsgrid = new Bsgrid <NoictVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = notices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 9
0
        public ActionResult SelectSalesorder(BsgridPage bsgriPage, int SalesordeID)//查询订单
        {
            var listSalesorder = (from tbSalesorder in myModels.PW_Salesorder
                                  join tbSalesCustomer in myModels.SYS_SalesCustomer on tbSalesorder.SalesCustomerID equals tbSalesCustomer.SalesCustomerID
                                  orderby tbSalesorder.SalesordeID descending
                                  select new SalesorderVo
            {
                SalesordeID = tbSalesorder.SalesordeID,            //订单ID
                SalesCustomerID = tbSalesCustomer.SalesCustomerID, //客户ID
                CustomerCode = tbSalesCustomer.CustomerCode,       //客户编码
                SalesorderNum = tbSalesorder.SalesorderNum,        //订单号
                Invoicedatek = tbSalesorder.Invoicedatek,          //开单日期
                Invoicno = tbSalesorder.Invoicno,                  //发票号码
                Deliverydate = tbSalesorder.Deliverydate,          //交货日期
                Operatorf = tbSalesorder.Operatorf,                //操作人
                Reviewwhether = tbSalesorder.Reviewwhether,        //审核否
                Thereviewer = tbSalesorder.Thereviewer,            //审核人
                Auditdate = tbSalesorder.Auditdate,                //审核日期
                Theamount = tbSalesorder.Theamount,                //总金额
                Remark = tbSalesorder.Remark,                      //备注
                Documents = tbSalesorder.Documents,                //单据状况
            }).ToList();
            //获取当前查询出来的数据的条数
            var totalCount = listSalesorder.Count();
            List <SalesorderVo> listItem = listSalesorder
                                           .Skip(bsgriPage.GetStartIndex()) //Skip取数据的位置
                                           .Take(bsgriPage.pageSize)        //Take取数据的条数
                                           .ToList();
            Bsgrid <SalesorderVo> bsgrid = new Bsgrid <SalesorderVo>()      //实例化对象
            {
                success   = true,
                totalRows = totalCount,
                curPage   = bsgriPage.curPage,
                data      = listSalesorder
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 查询修改售价变价
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult ChaXunShouJiaBianJia(BsgridPage bsgridPage)
        {
            var listGoodsDetail = (from tbGoodsBianJia in MyModels.B_GoodsBianJiaList
                                   //join tbGoodsDetail in MyModels.B_GoodsDetailList on tbGoodsBianJia.GoodsDetailID equals tbGoodsDetail.GoodsDetailID
                                   join tbChangeWhy in MyModels.S_ChangeWhyList on tbGoodsBianJia.ChangeWhyID equals tbChangeWhy.ChangeWhyID
                                   join tbChangeType in MyModels.S_ChangeTypeList on tbGoodsBianJia.ChangeTypeID equals tbChangeType.ChangeTypeID
                                   where tbGoodsBianJia.BeginChangeData != null
                                   orderby tbGoodsBianJia.GoodsBianJiaID
                                   select new Vo.Goods
            {
                GoodsBianJiaID = tbGoodsBianJia.GoodsBianJiaID,
                BianJiaBianHao = tbGoodsBianJia.BianJiaBianHao,
                ChangeTypeID = tbChangeType.ChangeTypeID,
                ChangeTypeName = tbChangeType.ChangeTypeName,
                ChangeWhyID = tbChangeWhy.ChangeWhyID,
                ChangeWhy = tbChangeWhy.ChangeWhy,
                ReleaseTimeStrf = tbGoodsBianJia.ChangeData.ToString(),
                //GoodsDetailID = tbGoodsDetail.GoodsDetailID,
                //NewAdvanceBid = tbGoodsBianJia.NewAdvanceBid,
                //NewNoAdvanceBid = tbGoodsBianJia.NewNoAdvanceBid,
                Registrant = tbGoodsBianJia.Registrant,
                ReleaseTimeStr = tbGoodsBianJia.RegisterTime.ToString(),
                Auditor = tbGoodsBianJia.Auditor,
                ReleaseTimeStrr = tbGoodsBianJia.Checktime.ToString(),
                //Executor = tbGoodsBianJia.Executor,
                ReleaseTimeStrrr = tbGoodsBianJia.ExecuteTime.ToString(),
            });
            int          intTotalRow = listGoodsDetail.Count();//总行数
            List <Goods> listNotices = listGoodsDetail.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();

            Bsgrid <Goods> bsgrid = new Bsgrid <Goods>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 批量设置(查询系列等级列表)
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="declareSeries"></param>
        /// <param name="declareGradeId"></param>
        /// <returns></returns>
        public ActionResult SelectDeclare(BsgridPage bsgridPage, string declareSeries, int declareGradeId)
        {
            try
            {
                List <DeclarePathVo> linqDeclarePath = (from tbDeclarePath in myModels.B_DeclarePath
                                                        join tbDeclareSeries in myModels.S_DeclareSeries on tbDeclarePath.DeclareSeriesID equals tbDeclareSeries.DeclareSeriesID
                                                        join tbDeclareGrade in myModels.S_DeclareGrade on tbDeclarePath.DeclareGradeID equals tbDeclareGrade.DeclareGradeID
                                                        join tbCommittedState in myModels.S_CommittedState on tbDeclarePath.CommittedStateID equals tbCommittedState.CommittedStateID
                                                        select new DeclarePathVo
                {
                    DeclarePathID = tbDeclarePath.DeclarePathID,
                    DeclareGradeID = tbDeclareGrade.DeclareGradeID,
                    DeclareSeries = tbDeclareSeries.DeclareSeries.ToString(),
                    DeclareGrade = tbDeclareGrade.DeclareGrade,
                }).ToList();

                if (!string.IsNullOrEmpty(declareSeries))
                {
                    linqDeclarePath = linqDeclarePath.Where(s => s.DeclareSeries.Contains(declareSeries.Trim())).ToList();
                }
                if (declareGradeId > 0)
                {
                    linqDeclarePath = linqDeclarePath.Where(s => s.DeclareGradeID == declareGradeId).ToList();
                }
                int intTotalRow = linqDeclarePath.Count();
                List <DeclarePathVo>   listFile = linqDeclarePath.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();//分页
                Bsgrid <DeclarePathVo> bsgrid   = new Bsgrid <DeclarePathVo>();
                bsgrid.success   = true;
                bsgrid.curPage   = bsgridPage.curPage;
                bsgrid.totalRows = intTotalRow;
                bsgrid.data      = linqDeclarePath;
                return(Json(bsgrid, JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json("failed", JsonRequestBehavior.AllowGet));
            }
        }
Ejemplo n.º 12
0
        public ActionResult SelectAreaCode(BsgridPage bsgridPage)//选择信息
        {
            var listGoods = (from tbAreaCode in MyModels.S_AreaCodeList
                             orderby tbAreaCode.AreaID
                             select new AreaCodeVo
            {
                AreaID = tbAreaCode.AreaID,
                AreaMC = tbAreaCode.AreaMC,
                Postalcode = tbAreaCode.Postalcode,
                CodeRule = tbAreaCode.CodeRule,
                DaiMa = tbAreaCode.DaiMa,
            });
            int intTotalRow = listGoods.Count();                                                                           //总行数
            List <AreaCodeVo> listNotices = listGoods.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <AreaCodeVo> bsgrid = new Bsgrid <AreaCodeVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 供货商单位维护
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="contractNumber"></param>
        /// <returns></returns>
        public ActionResult SelectHeTongChuLi(BsgridPage bsgridPage, string contractNumber)
        {
            var listOrderFormPact = (from tbOrderFormPact in MyModels.B_OrderFormPactList

                                     join tbAgreementStateList in MyModels.S_AgreementStateList on tbOrderFormPact.AgreementStatusID equals tbAgreementStateList.AgreementStateID

                                     join tbAgreementType in MyModels.S_AgreementTypeList on tbOrderFormPact.AgreementTypeID equals tbAgreementType.AgreementTypeID



                                     orderby tbOrderFormPact.OrderFormPactID
                                     select new OrderFormPactList
            {
                OrderFormPactID = tbOrderFormPact.OrderFormPactID,

                SupplierID = tbOrderFormPact.SupplierID,
                AgreementTypeID = tbOrderFormPact.AgreementTypeID,
                AgreementTypeName = tbAgreementType.AgreementTypeName,
                ReleaseTimeStrr = tbOrderFormPact.ValidBegin.ToString(),
                ReleaseTimeStrrr = tbOrderFormPact.ValidTip.ToString(),
                GoodsID = tbOrderFormPact.GoodsID,
                AgreementStatusID = tbOrderFormPact.AgreementStatusID,
                AgreementState = tbAgreementStateList.AgreementState,
                ReleaseTimeStr = tbOrderFormPact.ConclusionTime.ToString(),
            }
                                     );
            int intTotalRow = listOrderFormPact.Count();                                                                                  //总行数
            List <OrderFormPactList> listNotices = listOrderFormPact.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <OrderFormPactList> bsgrid = new Bsgrid <OrderFormPactList>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 14
0
        public ActionResult SelectHeellingInfo(BsgridPage bsgridPage)//选择信息
        {
            var listGoods = (from tbMemberInfo in MyModels.S_MemberInfoList
                             orderby tbMemberInfo.MemberID
                             select new MemberInfoVo
            {
                MemberID = tbMemberInfo.MemberID,                                                                            //会员ID
                XingMing = tbMemberInfo.XingMing,                                                                            //姓名
                CredentialsType = tbMemberInfo.CredentialsType,                                                              //证件类型
                CredentialsNumber = tbMemberInfo.CredentialsNumber,                                                          //证件号码
                PostalAddress = tbMemberInfo.PostalAddress,                                                                  //通讯地址
                Location = tbMemberInfo.Location,                                                                            //所在区域
                Postalcode = tbMemberInfo.Postalcode,                                                                        //邮政编码
                dianziyoujian = tbMemberInfo.dianziyoujian,                                                                  //电子邮件
                Profession = tbMemberInfo.Profession,                                                                        //职业
                OfficePhone = tbMemberInfo.OfficePhone,                                                                      //办公电话
                PrivateTelephone = tbMemberInfo.PrivateTelephone,                                                            //私人电话
                CellphoneNumber = tbMemberInfo.CellphoneNumber,                                                              //手机号码
                TimeToMall = tbMemberInfo.TimeToMall,                                                                        //至商场时间
                MemberEd = tbMemberInfo.MemberEd,                                                                            //教育程度
                MemberFamilyIncome = tbMemberInfo.MemberFamilyIncome,                                                        //家庭收入
                Vehicle = tbMemberInfo.Vehicle,                                                                              //交通工具
                FamilyMember = tbMemberInfo.FamilyMember,                                                                    //家庭成员
                CardNumberChange = tbMemberInfo.CardNumberChange,                                                            //卡号变更
                CommentsOnAForm = tbMemberInfo.CommentsOnAForm,                                                              //备注
            });
            int intTotalRow = listGoods.Count();                                                                             //总行数
            List <MemberInfoVo> listNotices = listGoods.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <MemberInfoVo> bsgrid = new Bsgrid <MemberInfoVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 查询打包商品定价
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult XiuGaiDingJiaXinXi(BsgridPage bsgridPage)
        {
            var listGoods = (from tbPackGoods in MyModels.B_PackGoodsList
                             join tbGoodsDetail in MyModels.B_GoodsDetailList on tbPackGoods.GoodsDetailID equals tbGoodsDetail.GoodsDetailID
                             join tbGoods in MyModels.B_GoodsList on tbGoodsDetail.GoodsID equals tbGoods.GoodsID
                             orderby tbPackGoods.PackGoodsID
                             select new Vo.Goods
            {
                PackGoodsID = tbPackGoods.PackGoodsID,
                GoodsID = tbGoods.GoodsID,
                GoodsDetailID = tbGoodsDetail.GoodsDetailID,
                RetailMonovalent = tbGoodsDetail.RetailMonovalent,
            });
            int          intTotalRow = listGoods.Count();                                                             //总行数
            List <Goods> listNotices = listGoods.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <Goods> bsgrid = new Bsgrid <Goods>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 16
0
        public ActionResult SelectUSermaterial(BsgridPage bsgridPage, int UserID)
        {
            var notict = from tbMaterialAttestation in myDYXTEntities.B_MaterialAttestationTable
                         join tbuser in myDYXTEntities.B_UserTable on tbMaterialAttestation.UserID equals tbuser.UserID
                         join tbSendstatus in myDYXTEntities.S_StatusTable on tbMaterialAttestation.StatusID equals tbSendstatus.StatusID
                         join tbItemType in myDYXTEntities.S_ItemTypeTable on tbMaterialAttestation.ItemTypeID equals tbItemType.ItemTypeID
                         where tbMaterialAttestation.UserID == UserID
                         select new B_MaterialAttestationVo
            {
                MaterialAttestationID = tbMaterialAttestation.MaterialAttestationID,
                UserID         = tbMaterialAttestation.UserID,
                ItemTypeID     = tbMaterialAttestation.ItemTypeID,
                StatusID       = tbMaterialAttestation.StatusID,
                UserName       = tbuser.UserName,
                ItemTypeName   = tbItemType.ItemTypeName,
                Integral       = tbMaterialAttestation.Integral,
                StatusName     = tbSendstatus.StatusName,
                ReleaseTimeStr = tbMaterialAttestation.AddTime.ToString(),
                Remarks        = tbMaterialAttestation.Remarks,
                ReviewRemarks  = tbMaterialAttestation.ReviewRemarks
            };


            int totalRow = notict.Count();
            List <B_MaterialAttestationVo> notices = notict.OrderBy(p => p.MaterialAttestationID).
                                                     Skip(bsgridPage.GetStartIndex()).
                                                     Take(bsgridPage.pageSize).
                                                     ToList();
            Bsgrid <B_MaterialAttestationVo> bsgrid = new Bsgrid <B_MaterialAttestationVo>();

            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = notices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 查询商品 信息(条件)
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectStudentAll(BsgridPage bsgridPage, int academeId, int gradeId) //查询信息
        {
            var linqItem = from tbSpaouc in myModels.S_SpouseBRanchList
                           join tbDetrem in myModels.B_DepatmenList on tbSpaouc.SpouseBRanchID equals tbDetrem.SpouseBRanchID
                           orderby tbDetrem.departmentID
                           select new LY.WareHouseDeitaLL
            {
                departmentID     = tbDetrem.departmentID,
                DfrugTypeID      = tbDetrem.DrugTypeID,
                SpouseBRancfdhID = tbSpaouc.SpouseBRanchID,
                departmentCodes  = tbDetrem.departmentCodes,
                departmentName   = tbDetrem.departmentName,
                HaoSunLv         = tbDetrem.HaoSunLv,
            };

            ////采购Id
            if (academeId > 0)
            {
                linqItem = linqItem.Where(s => s.SpouseBRancfdhID == academeId);
            }

            int intTotalRow = linqItem.Count();
            List <WareHouseDeitaLL> listStudent = linqItem
                                                  .Skip(bsgridPage.GetStartIndex())
                                                  .Take(bsgridPage.pageSize).ToList();

            Bsgrid <WareHouseDeitaLL> bsgrid = new Bsgrid <WareHouseDeitaLL>
            {
                success   = true,         //分页
                totalRows = intTotalRow,
                curPage   = bsgridPage.curPage,
                data      = listStudent
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 18
0
        public ActionResult SelectTableCollageDetai(BsgridPage bsgridPage, int CollageID)//查询退料明细信息
        {
            var lingItem = (from tbCollageDetai in myModels.SYS_CollageDetai
                            join tbMaintainability in myModels.SYS_Maintainability on tbCollageDetai.MaintainabilityID equals tbMaintainability.MaintainabilityID
                            join tbWarehouse in myModels.SYS_Warehouse on tbCollageDetai.WarehouseID equals tbWarehouse.WarehouseID
                            join tbCollage in myModels.PW_Collage on tbCollageDetai.CollageID equals tbCollage.CollageID
                            join tbReception in myModels.PW_Reception on tbCollage.ReceptionID equals tbReception.ReceptionID
                            where tbCollageDetai.CollageID == CollageID
                            select new CollageDetaiVo
            {
                CollageID = tbCollageDetai.CollageID,
                CollageDetaiID = tbCollageDetai.CollageDetaiID,
                MaintainabilityID = tbCollageDetai.MaintainabilityID,
                MaintainabilityName = tbMaintainability.MaintainabilityName.Trim(),
                MaintenanceNum = tbReception.MaintenanceNum.Trim(),
                WarehouseID = tbCollageDetai.WarehouseID,
                WarehouseName = tbWarehouse.WarehouseName.Trim(),
                Quantity = tbCollageDetai.Quantity,
                UnitPrice = tbCollageDetai.UnitPrice,
                Amount = tbCollageDetai.Amount,
                Position = tbCollageDetai.Position.Trim(),
                VehicleType = tbCollageDetai.VehicleType.Trim(),
                FittingsName = tbCollageDetai.FittingsName.Trim(),
                FittingsCode = tbCollageDetai.FittingsCode.Trim(),
                FittingsSpec = tbCollageDetai.FittingsSpec.Trim(),
                SystemUnit = tbCollageDetai.SystemUnit.Trim(),
            }).ToList();
            int count = lingItem.Count();
            List <CollageDetaiVo>   listCollageDetai = lingItem.OrderBy(m => m.FittingsCode).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <CollageDetaiVo> bsgrid           = new Bsgrid <CollageDetaiVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listCollageDetai
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 19
0
        public ActionResult DaoRuPeiJian(BsgridPage bsgridPage, int ReceptionID)//查询领料导入配件信息
        {
            var lingItem = (from tbRecProductDetail in myModels.SYS_RecProductDetail
                            join tbMaintainability in myModels.SYS_Maintainability on tbRecProductDetail.MaintainabilityID equals tbMaintainability.MaintainabilityID
                            where tbRecProductDetail.ReceptionID == ReceptionID
                            select new ProductVo
            {
                ReceptionID = tbRecProductDetail.ReceptionID,
                RecProductDetailID = tbRecProductDetail.RecProductDetailID,
                MaintainabilityID = tbRecProductDetail.MaintainabilityID,
                MaintainabilityName = tbMaintainability.MaintainabilityName,
                FittingsCode = tbRecProductDetail.FittingsCode.Trim(),
                FittingsName = tbRecProductDetail.FittingsName.Trim(),
                SystemUnit = tbRecProductDetail.SystemUnit.Trim(),
                Quantity = tbRecProductDetail.Quantity,
                UnitPrice = tbRecProductDetail.UnitPrice,
                FittingsSpec = tbRecProductDetail.FittingsSpec.Trim() != null? tbRecProductDetail.FittingsSpec.Trim():"",
                Amount = tbRecProductDetail.Amount,
                Remark = tbRecProductDetail.Remark.Trim(),
                VehicleType = tbRecProductDetail.VehicleType.Trim()
            }).ToList();
            int count = lingItem.Count();
            List <ProductVo>   listReception = lingItem.OrderBy(m => m.PreProductDetailID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <ProductVo> bsgrid        = new Bsgrid <ProductVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listReception
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 20
0
        //修理项目设置
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult SelectProjects(BsgridPage bsgridPage, int RepairClassID)
        {
            var listProjects = (from tbProjects in myModels.SYS_RepairItem
                                join tbRepairClass in myModels.SYS_RepairClass on tbProjects.RepairClassID equals tbRepairClass.RepairClassID
                                join tbMaintenance in myModels.SYS_Maintenance on tbProjects.MaintenanceID equals tbMaintenance.MaintenanceID
                                select new ProjectsVo
            {
                RepairItemID = tbProjects.RepairItemID,          //修理项目ID
                RepairClassID = tbRepairClass.RepairClassID,     //修理大类ID
                RepairClassName = tbRepairClass.RepairClassName, //修理大类名称
                RepairClassNum = tbRepairClass.RepairClassNum,   //修理大类编号
                RepairItemNum = tbProjects.RepairItemNum,        //项目编号
                RepairItemName = tbProjects.RepairItemName,      //修理项目名称
                Maintenance = tbMaintenance.MaintenanceName,     //维修工艺
                RepairCharge = tbProjects.RepairCharge,          //修理费
                Money = tbProjects.Money,                        //派工总金额
                TimeUnit = tbProjects.TimeUnit,                  //工时单价
                WorkTime = tbProjects.WorkTime,                  //派工总工时
                ToDeactivate = tbProjects.ToDeactivate,          //停用标志
                PinYinCode = tbProjects.PinYinCode,              //简拼码
                Remark = tbProjects.Remark                       //备注
            }).ToList();

            if (RepairClassID > 0)
            {
                listProjects = listProjects.Where(m => m.RepairClassID == RepairClassID).ToList();
            }
            int count = listProjects.Count();
            List <ProjectsVo>   listFittingsInfo = listProjects.OrderByDescending(m => RepairClassID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <ProjectsVo> bsgrid           = new Bsgrid <ProjectsVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listFittingsInfo,
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult SelectMaintenance(BsgridPage bsgridPage, int RegionID)
        {
            var listMaintenance = (from tbMaintenance in myModels.SYS_MaintenanceCus
                                                                                                                                                              //join tbVehicleType in myModels.SYS_VehicleType on tbMaintenance.VehicleTypeID equals tbVehicleType.VehicleTypeID//车型
                                   join tbInsuranceSpe in myModels.SYS_InsuranceSpe on tbMaintenance.InsuranceSpeID equals tbInsuranceSpe.InsuranceSpeID      //保险种类
                                   join tbDepartment in myModels.SYS_Department on tbMaintenance.DepartmentID equals tbDepartment.DepartmentID                //所属部门
                                   join tbCarder in myModels.SYS_Carder on tbMaintenance.CarderID equals tbCarder.CarderID                                    //所属员工
                                   join tbCustomerType in myModels.SYS_CustomerType on tbMaintenance.CustomerLevelID equals tbCustomerType.CustomerTypeID     //客户类别
                                   join tbCustomerLevel in myModels.SYS_CustomerLevel on tbMaintenance.CustomerLevelID equals tbCustomerLevel.CustomerLevelID //客户等级
                                   join tbRegion in myModels.SYS_Region on tbMaintenance.RegionID equals tbRegion.RegionID                                    //所在区域
                                   join tbCustomerSou in myModels.SYS_CustomerSou on tbMaintenance.CustomerSouID equals tbCustomerSou.CustomerSouID           //客户来源
                                   select new MaintenanceVo
            {
                RegionID = tbRegion.RegionID,                                  //区域ID
                MaintenanceCusID = tbMaintenance.MaintenanceCusID,             //维修客户ID
                CustomerNum = tbMaintenance.CustomerNum,                       //客户编号
                Owner = tbMaintenance.Owner,                                   //车主
                LicenseCode = tbMaintenance.LicenseCode,                       //车牌号码
                VehicleType = tbMaintenance.VehicleType,                       //车型
                EngineNum = tbMaintenance.EngineNum,                           //发动机号
                FrameNum = tbMaintenance.FrameNum,                             //车架号
                RepairMan = tbMaintenance.RepairMan,                           //送修人
                RepairTele = tbMaintenance.RepairTele,                         //送修人电话
                MobilePhone = tbMaintenance.MobilePhone,                       //车主手机
                InsuranceSpeName = tbInsuranceSpe.InsuranceSpeName,            //保险种类
                InitialStartDates = tbMaintenance.InitialStartDate.ToString(), //保险起始日
                InitialEndDates = tbMaintenance.InitialEndDate.ToString(),     //保险终止日
                Address = tbMaintenance.Address,                               //车主地址
                DriveDates = tbMaintenance.DriveDate.ToString(),               //行驶证年审日期
                DepartmentName = tbDepartment.DepartmentName,                  //所属部门
                Carder = tbCarder.CarderName,                                  //所属员工
                CustomerLevel = tbCustomerLevel.CustomerLevel,                 //客户等级
                CustomerSou = tbCustomerSou.CustomerSou,                       //客户来源
                CustomerType = tbCustomerType.CustomerType,                    //客户类别

                Region = tbRegion.RegionName,                                  //所在区域
                InputPerson = tbMaintenance.InputPerson,                       //录入人
            }).ToList();

            if (RegionID > 0)
            {
                listMaintenance = listMaintenance.Where(m => m.RegionID == RegionID).ToList();
            }
            int count = listMaintenance.Count();
            List <MaintenanceVo>   listFittingsInfo = listMaintenance.OrderByDescending(m => RegionID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <MaintenanceVo> bsgrid           = new Bsgrid <MaintenanceVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listFittingsInfo,
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectQuery(BsgridPage bsgridPage, string FittingsCode, string FittingsName, string FittingsType, int WarehouseID)
        {
            var lingItem = (from tbQuery in myModels.SYS_Inventory
                            join tbWarehouse in myModels.SYS_Warehouse on tbQuery.WarehouseID equals tbWarehouse.WarehouseID
                            select new QueryVo
            {
                InventoryID = tbQuery.InventoryID,              //库存ID
                WarehouseID = tbWarehouse.WarehouseID,          //仓库ID
                WarehouseName = tbWarehouse.WarehouseName,      //仓库名称
                FittingsTypeName = tbQuery.FittingsType.Trim(), //所属类型
                FittingsCode = tbQuery.FittingsCode,            //配件编码
                FittingsName = tbQuery.FittingsName,            //配件名称
                VehicleType = tbQuery.VehicleType,              //车型
                SystemUnit = tbQuery.SystemUnit,                //单位
                InvenQuan = tbQuery.InvenQuan,                  //库存量
                NewIntake = tbQuery.NewIntake,                  //最新进价
                WholePrice = tbQuery.WholePrice,                //批发价
                SalePrice = tbQuery.SalePrice,                  //销售价
                MinInventory = tbQuery.MinInventory,            //最低库存
                Position = tbQuery.Position,                    //仓位
            }).ToList();

            #region

            if (!string.IsNullOrEmpty(FittingsCode))
            {
                lingItem = lingItem.Where(m => m.FittingsCode.Contains(FittingsCode)).ToList();//配件编码查询
            }
            if (!string.IsNullOrEmpty(FittingsName))
            {
                lingItem = lingItem.Where(m => m.FittingsName.Contains(FittingsName)).ToList();//配件名称查询
            }
            if (!string.IsNullOrEmpty(FittingsType))
            {
                lingItem = lingItem.Where(m => m.FittingsTypeName.Contains(FittingsType)).ToList();//配件类型查询
            }
            if (WarehouseID > 0)
            {
                lingItem = lingItem.Where(m => m.WarehouseID == WarehouseID).ToList();
            }
            #endregion
            int              count     = lingItem.Count();
            List <QueryVo>   listQuery = lingItem.OrderByDescending(m => m.InventoryID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <QueryVo> bsgrid    = new Bsgrid <QueryVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listQuery,
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectSpareQuery(BsgridPage bsgridPage, string FittingsCode, string FittingsName, string FittingsType)
        {
            var lingItem = (from tbSpareQuery in myModels.SYS_FittingsInfo
                            join tbFittingsType in myModels.SYS_FittingsType on tbSpareQuery.FittingsTypeID equals tbFittingsType.FittingsTypeID
                            join tbSystemUnit in myModels.SYS_SystemUnit on tbSpareQuery.SystemUnitID equals tbSystemUnit.SystemUnitID
                            join tbVehicleType in myModels.SYS_VehicleType on tbSpareQuery.VehicleTypeID equals tbVehicleType.VehicleTypeID
                            join tbSuppliers in myModels.SYS_Suppliers on tbSpareQuery.SuppliersID equals tbSuppliers.SuppliersID
                            select new SpareVo
            {
                FittingsInfoID = tbSpareQuery.FittingsInfoID,       //配件信息ID
                FittingsTypeID = tbFittingsType.FittingsTypeID,     //商品类别ID
                FittingsTypeName = tbFittingsType.FittingsTypeName, //商品类别
                Barcode = tbSpareQuery.Barcode,                     //条码
                FittingsCode = tbSpareQuery.FittingsCode,           //配件编码
                FittingsName = tbSpareQuery.FittingsName,           //配件名称
                VehicleType = tbVehicleType.VehicleType,            //车型
                SuppliersName = tbSuppliers.SuppliersName,          //供应商
                Brand = tbSpareQuery.Brand,                         //品牌
                InvenQuan = tbSpareQuery.InvenQuan,                 //库存量
                InventoryMax = tbSpareQuery.InventoryMax,           //库存上限
                InventoryMin = tbSpareQuery.InventoryMin,           //库存下限
                SystemUnit = tbSystemUnit.SystemUnit,               //单位
                Intake = tbSpareQuery.Intake,                       //进价
                SalesPrice = tbSpareQuery.SalesPrice,               //销售价格
                Specification = tbSpareQuery.Specification,         //配件规格
            }).ToList();

            #region

            if (!string.IsNullOrEmpty(FittingsCode))
            {
                lingItem = lingItem.Where(m => m.FittingsCode.Contains(FittingsCode)).ToList();//配件编码查询
            }
            if (!string.IsNullOrEmpty(FittingsName))
            {
                lingItem = lingItem.Where(m => m.FittingsName.Contains(FittingsName)).ToList();//配件名称查询
            }
            if (!string.IsNullOrEmpty(FittingsType))
            {
                lingItem = lingItem.Where(m => m.FittingsTypeName.Contains(FittingsType)).ToList();//配件类型查询
            }

            #endregion
            int              count     = lingItem.Count();
            List <SpareVo>   listSpare = lingItem.OrderByDescending(m => m.FittingsInfoID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <SpareVo> bsgrid    = new Bsgrid <SpareVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listSpare,
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 查询属性信息
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="GasisId"></param>
        /// <returns></returns>
        public ActionResult SelectProperties(BsgridPage bsgridPage, int GasisId)
        {
            var listGasis = from tbBaseDetail in MyModels.B_BaseDetailList
                            select new Vo.BaseDetai
            {
                BaseTypeID     = tbBaseDetail.BaseTypeID,
                BaseDetailID   = tbBaseDetail.BaseDetailID,
                BaseDetailName = tbBaseDetail.BaseDetailName,
                CancelBit      = tbBaseDetail.CancelBit,
            };

            if (GasisId > 0)
            {
                listGasis = listGasis.Where(p => p.BaseTypeID == GasisId);
            }

            int intTotalRow             = listGasis.Count();
            List <BaseDetai> listGasiss = listGasis.OrderByDescending(p => p.BaseTypeID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();

            Bsgrid <BaseDetai> Bsgrid = new Bsgrid <BaseDetai>();

            Bsgrid.success   = true;
            Bsgrid.totalRows = intTotalRow;
            Bsgrid.curPage   = bsgridPage.curPage;
            Bsgrid.data      = listGasiss;
            return(Json(Bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 查询导入的文件列表
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult SelectSessImportStudent(BsgridPage bsgridPage)
        {
            List <PatientVo> studentVos = new List <PatientVo>();

            if (Session["ImportExcel"] != null)
            {
                studentVos = Session["ImportExcel"] as List <PatientVo>;
            }

            List <PatientVo> listStudent = studentVos.OrderBy(p => p.SickpersonID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();

            Bsgrid <PatientVo> bsgrid = new Bsgrid <PatientVo>();

            bsgrid.success   = true;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.totalRows = studentVos.Count;
            bsgrid.data      = studentVos;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 26
0
        public ActionResult SelectSalesReturnl(BsgridPage bsgriPage, string StarAuditdate, string EndAuditdate, string Oddseats, string ToAudit)//查询单据
        {
            var listSalesReturnl = (from tbSalesReturnl in myModels.PW_SalesReturnl
                                    join tbSalesCustomer in myModels.SYS_SalesCustomer on tbSalesReturnl.SalesCustomerID equals tbSalesCustomer.SalesCustomerID //销售客户
                                    orderby tbSalesReturnl.SalesReturnlID descending
                                    select new SalesReturnlVo
            {
                SalesReturnlID = tbSalesReturnl.SalesReturnlID,        //退货ID
                SalesCustomerID = tbSalesCustomer.SalesCustomerID,     //客户ID
                CustomerCode = tbSalesCustomer.CustomerCode,           //客户编码
                CustomerName = tbSalesCustomer.CustomerName,           //客户名称
                Oddseats = tbSalesReturnl.Oddseats,                    //退货单号
                Stockremoval = tbSalesReturnl.Stockremoval,            //出货单号
                OpenDate = tbSalesReturnl.OpenDate,                    //开单日期
                OpenDates = tbSalesReturnl.OpenDate.ToString(),        //开单日期(格式转换)
                Returnmode = tbSalesReturnl.Returnmode,                //退货方式
                Operator = tbSalesReturnl.Operator,                    //操作人
                ToAudit = tbSalesReturnl.ToAudit,                      //审核否
                Auditor = tbSalesReturnl.Auditor,                      //审核人
                Theamount = tbSalesReturnl.Theamount,                  //总金额
                AuditDate = tbSalesReturnl.AuditDate,                  //审核日期
                AuditDates = tbSalesReturnl.AuditDate.ToString(),      //审核日期(格式转换)
                Remark = tbSalesReturnl.Remark,                        //备注
            }).ToList();

            #region 多条件查询
            // 时间(范围查询)
            if (StarAuditdate != "" && EndAuditdate != "")
            {
                DateTime starAuditdate = Convert.ToDateTime(StarAuditdate);
                DateTime endAuditdate  = Convert.ToDateTime(EndAuditdate);
                listSalesReturnl = listSalesReturnl.Where(m => m.AuditDate >= starAuditdate && m.AuditDate <= endAuditdate).ToList();
            }
            if (StarAuditdate != "" && EndAuditdate == "")
            {
                DateTime starAuditdate = Convert.ToDateTime(StarAuditdate);
                listSalesReturnl = listSalesReturnl.Where(m => m.AuditDate >= starAuditdate).ToList();
            }
            if (StarAuditdate == "" && EndAuditdate != "")
            {
                DateTime endAuditdate = Convert.ToDateTime(EndAuditdate);
                listSalesReturnl = listSalesReturnl.Where(m => m.AuditDate <= endAuditdate).ToList();
            }

            // 单号
            if (!string.IsNullOrEmpty(Oddseats))
            {
                listSalesReturnl = listSalesReturnl.Where(m => m.Oddseats.Contains(Oddseats)).ToList();
            }

            // 审核
            if (ToAudit == "1")
            {
                listSalesReturnl = listSalesReturnl.Where(m => m.ToAudit == true).ToList();
            }
            else if (ToAudit == "2")
            {
                listSalesReturnl = listSalesReturnl.Where(m => m.ToAudit == false).ToList();
            }
            #endregion

            //获取当前查询出来的数据的条数
            var totalCount = listSalesReturnl.Count();
            List <SalesReturnlVo> listItem = listSalesReturnl
                                             .Skip(bsgriPage.GetStartIndex()) //Skip取数据的位置
                                             .Take(bsgriPage.pageSize)        //Take取数据的条数
                                             .ToList();
            Bsgrid <SalesReturnlVo> bsgrid = new Bsgrid <SalesReturnlVo>()    //实例化对象
            {
                success   = true,
                totalRows = totalCount,
                curPage   = bsgriPage.curPage,
                data      = listSalesReturnl
            };
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 27
0
        public ActionResult SelectIncoming(BsgridPage bsgridPage, string IncomeNum, string Timeone, string Timetow, string ToAudit, int BalanceStateID)//查询单据数据
        {
            var listIncoming = (from tbIncoming in myModels.PW_Incoming
                                join tbSuppli in myModels.SYS_Suppliers on tbIncoming.SuppliersID equals tbSuppli.SuppliersID
                                join tbWareho in myModels.SYS_Warehouse on tbIncoming.WarehouseID equals tbWareho.WarehouseID
                                join tbBalanc in myModels.SYS_BalanceState on tbIncoming.BalanceStateID equals tbBalanc.BalanceStateID
                                join tbUser in myModels.PW_User on tbIncoming.UserID equals tbUser.UserID
                                orderby tbIncoming.IncomingID descending
                                select new IncomeVo
            {
                IncomingID = tbIncoming.IncomingID,
                SuppliersID = tbSuppli.SuppliersID,
                WarehouseID = tbWareho.WarehouseID,
                BalanceStateID = tbBalanc.BalanceStateID,
                UserID = tbUser.UserID,
                BalanceState = tbBalanc.BalanceState,
                SuppliersName = tbSuppli.SuppliersName.Trim(),
                SuppliersFirm = tbSuppli.SuppliersFirm.Trim(),
                MakerDates = tbIncoming.BilDate.ToString(),
                BilDate = tbIncoming.BilDate,
                Operator = tbIncoming.Operator.Trim(),
                IncomingNumber = tbIncoming.IncomingNumber,
                IndentNumber = tbIncoming.IndentNumber,
                DeliveryDeadlines = tbIncoming.PaymentDate.ToString(),
                WarehouseName = tbWareho.WarehouseName.Trim(),
                Aamount = tbIncoming.Aamount,
                ToAudit = tbIncoming.ToAudit,
                Auditor = tbIncoming.Auditor,
                AuditerDates = tbIncoming.AuditDate.ToString(),
                Rmark = tbIncoming.Rmark.Trim(),
            }).ToList();

            if (!string.IsNullOrEmpty(IncomeNum))
            {
                listIncoming = listIncoming.Where(m => m.IncomingNumber.Contains(IncomeNum)).ToList();//单号查询
            }

            if (!string.IsNullOrEmpty(Timeone) && !string.IsNullOrEmpty(Timetow))//时间范围查询
            {
                DateTime Time1 = Convert.ToDateTime(Timeone);
                DateTime Time2 = Convert.ToDateTime(Timetow);
                listIncoming = listIncoming.Where(m => m.BilDate >= Time1 && m.BilDate <= Time2).ToList();
            }
            if (ToAudit == "1")
            {
                listIncoming = listIncoming.Where(m => m.ToAudit == true).ToList();// 审核
            }
            else if (ToAudit == "2")
            {
                listIncoming = listIncoming.Where(m => m.ToAudit == false).ToList();
            }
            if (BalanceStateID > 0)
            {
                listIncoming = listIncoming.Where(m => m.BalanceStateID == BalanceStateID).ToList();
            }
            int               count   = listIncoming.Count();
            List <IncomeVo>   listPro = listIncoming.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <IncomeVo> bsgrid  = new Bsgrid <IncomeVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listPro,
            };

            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 前台销售订单查询
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="shooppingnumber"></param>
        /// <param name="shooppingTime"></param>
        /// <returns></returns>
        public ActionResult SelectShooppingOrderFount2(BsgridPage bsgridPage, string shooppingnumber, string shooppingTime)
        {
            var items = from tbShooppingOrderFount in MyModels.B_ShooppingOrderFountList
                        join tbShooppingDateilIDOrderFoun in MyModels.B_ShooppingDateilIDOrderFounList on tbShooppingOrderFount.ShooppingOrderFountID equals tbShooppingDateilIDOrderFoun.ShooppingOrderFountID
                        join tbShopping in MyModels.B_ShoppingList on tbShooppingDateilIDOrderFoun.ShoppingID equals tbShopping.ShoppingID
                        join tbGoodsListedDetail in MyModels.B_GoodsListedDetailList on tbShopping.GoodsListedDetailID equals tbGoodsListedDetail.GoodsListedDetailID

                        join tbGoodsListed in MyModels.B_GoodsListedList on tbGoodsListedDetail.GoodsListedID equals tbGoodsListed.GoodsListedID
                        join tbLeiXing in MyModels.S_HuoDongZhuanQu on tbGoodsListed.GoodsDingYiQuID equals tbLeiXing.GoodsDingYiQuID
                        join tbConverDeTail in MyModels.B_ConverDeTailList on tbGoodsListedDetail.ConverDateilID equals tbConverDeTail.ConverDeTaiID

                        join tbGoods in MyModels.B_GoodsList on tbConverDeTail.GoodsID equals tbGoods.GoodsID
                        join tbEstimateUnit in MyModels.S_EstimateUnitList on tbGoods.EstimateUnitID equals tbEstimateUnit.EstimateUnitID
                        join tbGoodsDetail in MyModels.B_GoodsDetailList on tbGoods.GoodsID equals tbGoodsDetail.GoodsID   //零售单价
                        join tbGoodsChop in MyModels.B_GoodsChopList on tbGoods.GoodsChopID equals tbGoodsChop.GoodsChopID //商标品牌

                        where tbShooppingOrderFount.ExamineNot == true

                        orderby tbShooppingOrderFount.ShooppingOrderFountID descending
                        select new Vo.Goods
            {
                //订单明细信息
                ShooppingDateilIDOrderFounID = tbShooppingDateilIDOrderFoun.ShooppingDateilIDOrderFounID,

                //订单信息
                ShooppingOrderFountID = tbShooppingOrderFount.ShooppingOrderFountID,
                ShooppingNumber       = tbShooppingOrderFount.ShooppingNumber,          /* 订单号*/
                ShooppingTime         = tbShooppingOrderFount.ShooppingTime,            /*生成订单号时间*/
                ReleaseTimeSW         = tbShooppingOrderFount.ShooppingTime.ToString(), /*生成订单号时间*/
                ExamineNot            = tbShooppingOrderFount.ExamineNot,               //订单审核否

                //购物单信息
                ShoppingID       = tbShopping.ShoppingID,
                MumberOfPackages = tbShopping.MumberOfPackages, /*购物单信息*/

                XingQi      = tbShopping.BitColer,              /*购物颜色*/
                Subdivision = tbShopping.Money,                 /*购物金额*/

                //上市明细信息
                GoodsListedDetailID = tbGoodsListedDetail.GoodsListedDetailID,

                Quantity  = tbGoodsListed.ConsigneeShop,
                ChangeWhy = tbLeiXing.GoodsDingYiQuMC,

                //配货明细信息
                ConverDateilID = tbConverDeTail.ConverDeTaiID,

                //商品信息
                GoodsID             = tbGoods.GoodsID,
                GoodsCode           = tbGoods.GoodsCode,  //商品编号*/
                GoodsName           = tbGoods.GoodsName,  /*商品名称*/
                EstimateUnitName    = tbEstimateUnit.EstimateUnitName,
                GoodsChopID         = tbGoodsChop.GoodsChopID,
                GoodsChopName       = tbGoodsChop.GoodsChopName,      /*商标品牌*/
                SpecificationsModel = tbGoods.SpecificationsModel,    /*规格型号*/
                RetailMonovalent    = tbGoodsDetail.RetailMonovalent, /*零售单价*/
            };

            //如果查询条件不为空
            if (!string.IsNullOrEmpty(shooppingnumber))
            {
                shooppingnumber = shooppingnumber.Trim();
                items           = items.Where(p => p.ShooppingNumber.Contains(shooppingnumber));
            }
            if (!string.IsNullOrEmpty(shooppingTime))
            {
                try
                {
                    DateTime dtreleaseTime = Convert.ToDateTime(shooppingTime);
                    items = items.Where(p => p.ShooppingTime == dtreleaseTime);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }

            int          intTotalRow = items.Count();                                                             //总行数
            List <Goods> listNotices = items.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList(); //分页

            Bsgrid <Goods> bsgrid = new Bsgrid <Goods>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 29
0
        public ActionResult SelectReception(BsgridPage bsgridPage, string StartDate, string EndDate, string CollageState, string CarNum)//查询客户接待单据信息
        {
            var lingItem = (from tbReception in myModels.PW_Reception
                            join tbRepair in myModels.SYS_Repair on tbReception.RepairID equals tbRepair.RepairID
                            join tbDocumentState in myModels.SYS_DocumentState on tbReception.DocumentStateID equals tbDocumentState.DocumentStateID
                            join tbBalanceState in myModels.SYS_BalanceState on tbReception.BalanceStateID equals tbBalanceState.BalanceStateID
                            join tbCustomerSou in myModels.SYS_CustomerSou on tbReception.CustomerSouID equals tbCustomerSou.CustomerSouID
                            select new ReceptionVo
            {
                ReceptionID = tbReception.ReceptionID,                                                                                 //客户接待ID
                RepairID = tbReception.RepairID,                                                                                       //修理类别ID
                RepairName = tbRepair.RepairName.Trim(),                                                                               //修理类别名称
                CustomerSouID = tbReception.CustomerSouID,                                                                             //客户来源ID
                CustomerSou = tbCustomerSou.CustomerSou.Trim(),                                                                        //客户来源名称
                DocumentStateID = tbDocumentState.DocumentStateID,                                                                     //单据状态ID
                DocumentState = tbDocumentState.DocumentState.Trim(),                                                                  //单据状态名称
                BalanceStateID = tbBalanceState.BalanceStateID,                                                                        //结算状态ID
                BalanceState = tbBalanceState.BalanceState.Trim(),                                                                     //结算状态名称
                CarNum = tbReception.CarNum.Trim(),                                                                                    //车牌
                VehicleType = tbReception.VehicleType.Trim(),                                                                          //车型
                Carder = tbReception.Carder.Trim(),                                                                                    //接车人名称
                Mileage = tbReception.Mileage.Trim(),                                                                                  //进厂里程
                MaintenanceNum = tbReception.MaintenanceNum.Trim(),                                                                    //维修单号
                Owner = tbReception.Owner.Trim(),                                                                                      //车主
                Address = tbReception.Address.Trim(),                                                                                  //地址
                OilQuantity = tbReception.OilQuantity.Trim(),                                                                          //油量
                OwnerTele = tbReception.OwnerTele,                                                                                     //车主电话
                EngineNum = tbReception.EngineNum.Trim(),                                                                              //发动机号码
                Repairman = tbReception.Repairman.Trim(),                                                                              //送修人
                SelfCoding = tbReception.SelfCoding.Trim(),                                                                            //自编号
                FrameNum = tbReception.FrameNum,                                                                                       //车架号码
                RepairmanTele = tbReception.RepairmanTele,                                                                             //送修人电话
                OpenDates = tbReception.OpenDate.ToString(),                                                                           //开单日期
                FactoryDates = tbReception.FactoryDate.ToString(),                                                                     //进厂日期
                BalanceDates = tbReception.BalanceDate.ToString(),                                                                     //结算日期
                openDates = tbReception.OpenDate.ToString(),                                                                           //开单日期
                factoryDates = tbReception.FactoryDate.ToString(),                                                                     //进厂日期
                balanceDates = tbReception.BalanceDate.ToString(),                                                                     //结算日期
                BalanceDateTo = tbReception.BalanceDate,                                                                               //结算日期(判断)
                Amount = tbReception.Amount,                                                                                           //总金额
                AmountPaid = tbReception.AmountPaid,                                                                                   //应收金额
                Describe = tbReception.Describe.Trim(),                                                                                //描述
                ToAudit = tbReception.ToAudit,                                                                                         //审核否
                CompletionDates = tbReception.CompletionDate.ToString() != null? tbReception.CompletionDate.ToString() : "0000-00-00", //完工日期
                ToSendWork = tbReception.ToSendWork,                                                                                   //派工状态
                CollageState = tbReception.CollageState.Trim(),                                                                        //领料状态
                MaintenAmount = tbReception.MaintenAmount,                                                                             //维修总费
            }).ToList();

            #region 拼接条件
            if (StartDate != "" && EndDate != "")
            {
                DateTime startDate = Convert.ToDateTime(StartDate);
                DateTime endDate   = Convert.ToDateTime(EndDate);
                lingItem = lingItem.Where(m => m.BalanceDateTo >= startDate.Date && m.BalanceDateTo <= endDate.Date).ToList();
            }
            if (StartDate != "" && EndDate == "")
            {
                DateTime startDate = Convert.ToDateTime(StartDate);
                lingItem = lingItem.Where(m => m.BalanceDateTo >= startDate.Date).ToList();
            }
            if (StartDate == "" && EndDate != "")
            {
                DateTime endDate = Convert.ToDateTime(EndDate);
                lingItem = lingItem.Where(m => m.BalanceDateTo <= endDate.Date).ToList();
            }
            if (!string.IsNullOrEmpty(CollageState))
            {
                lingItem = lingItem.Where(m => m.CollageState == CollageState).ToList();
            }
            if (!string.IsNullOrEmpty(CarNum))
            {
                lingItem = lingItem.Where(m => m.CarNum.Contains(CarNum)).ToList();
            }
            #endregion
            int count = lingItem.Count();
            List <ReceptionVo>   listReception = lingItem.OrderBy(m => m.ToAudit).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();
            Bsgrid <ReceptionVo> bsgrid        = new Bsgrid <ReceptionVo>()
            {
                success   = true,
                totalRows = count,
                curPage   = bsgridPage.curPage,
                data      = listReception
            };
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 30
0
        /// <summary>
        /// 条件查询
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="supplierID"></param>
        /// <param name="orderFormPactID"></param>
        /// <param name="spouseBRanchID"></param>
        /// <returns></returns>
        public ActionResult SelectOrderFormDetailList(BsgridPage bsgridPage, string supplierName, string contractNumber, int spouseBRanchID)
        {
            var items = (from tbOrderFormDetail in MyModels.B_OrderFormDetailList
                         join tbGoods in MyModels.B_GoodsList on tbOrderFormDetail.GoodsID equals tbGoods.GoodsID
                         join tbGoodsss in MyModels.B_GoodsDetailList on tbGoods.GoodsID equals tbGoodsss.GoodsID
                         //join tbStock in MyModels.B_StockList on tbOrderFormDetail.StockID equals tbStock.StockID
                         join tbOrderForm in MyModels.B_OrderFormList on tbOrderFormDetail.OrderFormID equals tbOrderForm.OrderFormID
                         join tbSupplier in MyModels.B_SupplierList on tbGoods.SupplierID equals tbSupplier.SupplierID
                         join tbOrderFormPact in MyModels.B_OrderFormPactList on tbOrderForm.OrderFormPactID equals tbOrderFormPact.OrderFormPactID
                         join tbSpouseBRanch in MyModels.S_SpouseBRanchList on tbOrderFormPact.SpouseBRanchID equals tbSpouseBRanch.SpouseBRanchID
                         orderby tbOrderFormDetail.OrderFormDetailID
                         select new Vo.Goods
            {
                OrderFormDetailID = tbOrderFormDetail.OrderFormDetailID,
                GoodsID = tbGoods.GoodsID,
                GoodsCode = tbGoods.GoodsCode,                     /*商品代码*/
                GoodsTiaoMa = tbGoods.GoodsTiaoMa,                 /*商品条码*/
                GoodsName = tbGoods.GoodsName,                     /*商品名称*/
                SpecificationsModel = tbGoods.SpecificationsModel, /*规格型号*/
                ArtNo = tbGoods.ArtNo,                             /*货号*/
                RetailMonovalent = tbGoodsss.RetailMonovalent,     /*零售单价*/
                //StockNumber = tbStock.StockNumber, /*库存数量*/
                //条件
                SupplierID = tbSupplier.SupplierID,
                SupplierName = tbSupplier.SupplierName,
                OrderFormPactID = tbOrderFormPact.OrderFormPactID,
                ContractNumber = tbOrderFormPact.ContractNumber,
                SpouseBRanchID = tbSpouseBRanch.SpouseBRanchID,
                SpouseBRanchName = tbSpouseBRanch.SpouseBRanchName,
            });

            //如果查询条件不为空
            if (!string.IsNullOrEmpty(supplierName))
            {
                supplierName = supplierName.Trim();
                items        = items.Where(p => p.SupplierName.Contains(supplierName));
            }
            if (!string.IsNullOrEmpty(contractNumber))
            {
                contractNumber = contractNumber.Trim();
                items          = items.Where(p => p.ContractNumber.Contains(contractNumber));
            }
            //if (supplierID > 0)
            //{
            //    items = items.Where(p => p.SupplierID == supplierID);
            //}
            //if (orderFormPactID > 0)
            //{
            //    items = items.Where(p => p.OrderFormPactID == orderFormPactID);
            //}
            if (spouseBRanchID > 0)
            {
                items = items.Where(p => p.SpouseBRanchID == spouseBRanchID);
            }
            int          intTotalRow = items.Count();//总行数
            List <Goods> listNotices = items.Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();

            Bsgrid <Goods> bsgrid = new Bsgrid <Goods>();

            bsgrid.success   = true;
            bsgrid.totalRows = intTotalRow;
            bsgrid.curPage   = bsgridPage.curPage;
            bsgrid.data      = listNotices;
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }