예제 #1
0
        // <summary>
        ///条件查询盘点计划(记录列表)
        /// </summary>
        /// <returns></returns>
        public ActionResult TiaoSelectCheckgh(Vo.BsgridPage bsgridPage, int StockPlaceID, string Remter)
        {
            var linq = (from tbGoodBiao in MyModels.B_CheckRemerbenList
                        join tbStock in MyModels.S_StockPlaceList on tbGoodBiao.StockPlaceID equals tbStock.StockPlaceID
                        where tbGoodBiao.Remter == Remter && tbGoodBiao.GoodsNot == false || tbGoodBiao.StockPlaceID == StockPlaceID && tbGoodBiao.GoodsNot == false
                        select new LY.WareHouseDeitaLL
            {
                CheckRermeberID = tbGoodBiao.CheckRermeberID,
                Remember = tbGoodBiao.Remter,
                PablData = tbGoodBiao.PablData.ToString(),
                CommodityType = tbGoodBiao.CommodityType,
                DrugType = tbGoodBiao.DrugType,

                StockPlaceName = tbStock.StockPlaceName,
                ExamineName = tbGoodBiao.ExamineName,
                ExamineTime = tbGoodBiao.ExamineTime.ToString(),
            }).ToList();
            int totalRow = linq.Count();

            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.GoodsChopID). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        /// <summary>
        /// 点击 查询 进仓单
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public ActionResult ChaXunJinCang(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbSelectWanHtsList in myModels.B_WareHouseList                                                                        //进仓单ID
                        join tbHeTong in myModels.B_OrderFormPactList on tbSelectWanHtsList.OrderFormPactID equals tbHeTong.OrderFormPactID        //合同ID
                        join tbPeiHuoBuMen in myModels.S_SpouseBRanchList on tbSelectWanHtsList.SpouseBRanchID equals tbPeiHuoBuMen.SpouseBRanchID //配货部门
                        join tbKuCuDiDian in myModels.S_StockPlaceList on tbSelectWanHtsList.StockPlaceID equals tbKuCuDiDian.StockPlaceID         //库存地点
                        where tbSelectWanHtsList.ExamineNot == true && tbSelectWanHtsList.QuFenLeiXingID == 1 && tbSelectWanHtsList.CrushRedNot == false ||
                        tbSelectWanHtsList.ExamineNot == true && tbSelectWanHtsList.QuFenLeiXingID == 2 && tbSelectWanHtsList.CrushRedNot == false
                        select new LY.WareHouseDeitaLL
            {
                WareHouseID = tbSelectWanHtsList.WareHouseID,              //进仓ID
                Remember = tbSelectWanHtsList.Remember,                    //进仓编号
                ContractNumber = tbHeTong.ContractNumber,                  //合同编号
                SpouseBRanchName = tbPeiHuoBuMen.SpouseBRanchName,         //进货部门
                StockPlaceName = tbKuCuDiDian.StockPlaceName,              //库存地点

                RegisterName = tbSelectWanHtsList.RegisterName,            //
                RegisterTime = tbSelectWanHtsList.RegisterTime.ToString(), //
                ExamineName = tbSelectWanHtsList.ExamineName,              //
                ExamineTime = tbSelectWanHtsList.ExamineTime.ToString(),   //
            }).ToList();
            int totalRow = linq.Count();

            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.WareHouseID). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        /// <summary>
        /// 查询 转库单
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public ActionResult ChaXunZhuanKu(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbZhuanKu in myModels.B_ChangeList                                                                            //转库单ID
                        join tbPeiHuoBuMen in myModels.S_SpouseBRanchList on tbZhuanKu.SpouseBRanchID equals tbPeiHuoBuMen.SpouseBRanchID  //部门
                        join tbKuCuDiDian in myModels.S_StockPlaceList on tbZhuanKu.StockPlaceID equals tbKuCuDiDian.StockPlaceID          //原库存地点
                        join tbNewKuCuDiDian in myModels.S_StockPlaceList on tbZhuanKu.StockPlaceIDtwo equals tbNewKuCuDiDian.StockPlaceID //新库存地点
                        where tbZhuanKu.ExamineNot == false
                        select new LY.PeiHuoDan
            {
                ChangeID = tbZhuanKu.ChangeID,
                WareHouseID = tbZhuanKu.WareHouseID,
                Remember = tbZhuanKu.Remember,
                SpouseBRanchName = tbPeiHuoBuMen.SpouseBRanchName,
                StockPlaceName = tbKuCuDiDian.StockPlaceName,
                StockPlaceNametwo = tbNewKuCuDiDian.StockPlaceName,
                payName = tbZhuanKu.payName,
                furlName = tbZhuanKu.furlName,
                RegisterName = tbZhuanKu.RegisterName,
                registerTime = tbZhuanKu.RegisterTime.ToString()
            }).ToList();
            int totalRow = linq.Count();

            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.ChangeID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        /// <summary>
        /// 查询要货单
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="stockPlaceID"></param>
        /// <returns></returns>
        public ActionResult SelectWanMetr(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbWanMetre in myModels.B_WanManifestList//要货单
                        join tbSpatouKrdg in myModels.S_SpouseBRanchList on tbWanMetre.PurchaseSectionID equals tbSpatouKrdg.SpouseBRanchID

                        select new LY.PeiHuoDan
            {
                WanManifestID = tbWanMetre.WanManifestID,
                SellID = tbWanMetre.SellID,                        //要货id
                Remember = tbWanMetre.Remember,                    //编号
                SpouseBRanchName = tbSpatouKrdg.SpouseBRanchName,  //部门
                RegisterName = tbWanMetre.RegisterName,            //制单人
                registerTime = tbWanMetre.RegisterTime.ToString(), //制单时间
                ExamineName = tbWanMetre.ExamineName,              //制单人
                examineTime = tbWanMetre.ExamineTime.ToString(),   //制单时间
                ExamineNot = tbWanMetre.ExamineNot                 //
            }).ToList();


            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.ConverID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        /// <summary>
        /// 查询进仓单(一)
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult ChaXunWareFonf(Vo.BsgridPage bsgridPage, int GongHuoBianHao, int AdjLeiXing)
        {
            string   dateTimeNow = DateTime.Now.ToString("yyyy-MM-dd");
            DateTime d           = Convert.ToDateTime(dateTimeNow);

            var Linq = from tbWaerHouse in myModels.B_WareHouseList
                       join tbStall in myModels.B_StaffList on tbWaerHouse.StaffID equals tbStall.StaffID                                                           //员工
                       join tbQuFen in myModels.S_QuFenLeiXingList on tbWaerHouse.QuFenLeiXingID equals tbQuFen.QuFenLeiXingID                                      //区分类型

                       join tbHeTong in myModels.B_OrderFormPactList on tbWaerHouse.OrderFormPactID equals tbHeTong.OrderFormPactID                                 //合同
                       join tbAdjLeiXing in myModels.S_AdjustAccountsFashionList on tbHeTong.AdjustAccountsFashionID equals tbAdjLeiXing.AdjustAccountsFashionID
                       join tbSupplier in myModels.B_SupplierList on tbHeTong.SupplierID equals tbSupplier.SupplierID                                               //供货商
                       join tbJieSuan in myModels.S_MethodOfSettlingAccountsList on tbHeTong.MethodOfSettlingAccountsID equals tbJieSuan.MethodOfSettlingAccountsID //结算
                       where tbWaerHouse.ExamineNot == true && tbWaerHouse.Status == true && tbWaerHouse.CrushRedNot == false &&
                       tbWaerHouse.ExamineTime == d
                       select new LY.WareHouseDeitaLL
            {
                WareHouseID              = tbWaerHouse.WareHouseID,            //进仓ID
                Remember                 = tbWaerHouse.Remember,               //进仓编号
                OrderFormPactID          = tbHeTong.OrderFormPactID,           //合同ID
                ContractNumber           = tbHeTong.ContractNumber,            //合同编号
                MethodOfSettlingAccounts = tbJieSuan.MethodOfSettlingAccounts, //结算方式
                SupplierCHName           = tbSupplier.SupplierCHName,          //供货商名称
                StaffID                 = tbStall.StaffID,                     //员工ID
                StaffCode               = tbStall.StaffCode,                   //员工编号
                StaffName               = tbStall.StaffName,                   //姓名
                RegisterTime            = tbWaerHouse.RegisterTime.ToString(), //登记时间
                ExamineNot              = tbWaerHouse.ExamineNot,              //审核状态
                Status                  = tbWaerHouse.Status,                  //生效状态
                CrushRedNot             = tbWaerHouse.CrushRedNot,             //冲红状态
                QuFenLeiXingID          = tbQuFen.QuFenLeiXingID,              //区分ID
                QuFenLeiXingMC          = tbQuFen.QuFenLeiXingMC,              //区分
                SupplierID              = tbSupplier.SupplierID,
                AdjustAccountsFashionID = tbAdjLeiXing.AdjustAccountsFashionID,
            };

            //区分ID不为空(因为是下拉框)
            if (GongHuoBianHao > 0)
            {
                Linq = Linq.Where(p => p.SupplierID == GongHuoBianHao);
            }
            if (AdjLeiXing > 0)
            {
                Linq = Linq.Where(p => p.AdjustAccountsFashionID == AdjLeiXing);
            }


            int totalRow = Linq.Count();
            List <LY.WareHouseDeitaLL> notices = Linq.OrderByDescending(p => p.Remember). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #6
0
        /// <summary>
        /// 查询盘点表(条件)
        /// </summary>
        /// <returns></returns>
        public ActionResult TiaoSelectHoaSun(Vo.BsgridPage bsgridPage, DateTime chertempatd)
        {
            var linq = (from tbCheckRemerben in myModels.B_CheckRemerbenList                                                //计划盘点表
                        join tbPanlBuMen in myModels.B_PanlList on tbCheckRemerben.DrugTypeID equals tbPanlBuMen.DrugTypeID //盘点部门表
                        join tbDerterm in myModels.B_DepatmenList on tbPanlBuMen.DrugTypeID equals tbDerterm.DrugTypeID
                        where tbCheckRemerben.Entering == true && tbCheckRemerben.PablData == chertempatd
                        select new LY.WareHouseDeitaLL
            {
                CheckRermeberID = tbCheckRemerben.CheckRermeberID,      //
                Remter = tbCheckRemerben.Remter,                        //
                EnteringTime = tbCheckRemerben.PablData.ToString(),     //
                RegisterTime = tbCheckRemerben.EnteringTime.ToString(), //
                departmentCodes = tbDerterm.departmentCodes,            //
                departmentName = tbDerterm.departmentName,              //
            }).ToList();


            int totalRow = linq.Count();
            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.GoodsClassifyID).
                                                 Skip(bsgridPage.GetStartIndex()).//F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #7
0
        ///查询损益
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectInsfdr(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbIncrea in MyModels.B_IncreaseList
                        join tbbumen in MyModels.B_PanlList on tbIncrea.DrugTypeID equals tbbumen.DrugTypeID
                        join tbKuCun in MyModels.S_StockPlaceList on tbIncrea.StockPlaceID equals tbKuCun.StockPlaceID
                        where tbIncrea.ExamineNot == false
                        select new LY.WareHouseDeitaLL
            {
                IncreaseID = tbIncrea.IncreaseID,
                Remember = tbIncrea.Remember,
                IncreaseCause = tbIncrea.IncreaseCause,
                DrugType = tbbumen.DrugType,
                StockPlaceName = tbKuCun.StockPlaceName,
                RegisterName = tbIncrea.RegisterName,
                RegisterTime = tbIncrea.RegisterTime.ToString(),
            }).ToList();

            int totalRow = linq.Count();
            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.GoodsChopID).//noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #8
0
        /// <summary>
        /// 查询(员工表)
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectYuanGong(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbYuanGong in myModels.B_StaffList
                        join tbStaffName in myModels.S_StaffClassList on tbYuanGong.StaffClassID equals tbStaffName.StaffClassID
                        where tbYuanGong.StaffClassID == 3
                        select new Vo.Staffl
            {
                StaffID = tbYuanGong.StaffID,
                StaffName = tbYuanGong.StaffName,
                StaffCode = tbYuanGong.StaffCode
            }).ToList();

            int totalRow             = linq.Count();
            List <Vo.Staffl> notices = linq.OrderByDescending(p => p.StaffID). //noboer表达式
                                       Skip(bsgridPage.GetStartIndex()).       //F12(看)
                                       Take(bsgridPage.pageSize).
                                       ToList();

            Vo.Bsgrid <Vo.Staffl> bsgrid = new Vo.Bsgrid <Vo.Staffl>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #9
0
        /// <summary>
        /// 查询返仓单
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="stockPlaceID"></param>
        /// <returns></returns>
        public ActionResult SelectSellctRect(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbSellct in MyModels.B_SellRetuerList//返仓单
                        join tbSpuBuMen in MyModels.S_StockPlaceList on tbSellct.StockPlaceID equals tbSpuBuMen.StockPlaceID
                        where tbSellct.ExamineNot == false
                        select new LY.PeiHuoDan
            {
                SellRetuerID = tbSellct.SellRetuerID,            //返仓id
                SellID = tbSellct.SellID,                        //销售id
                Remember = tbSellct.Remember,                    //返仓单编号
                StockPlaceName = tbSpuBuMen.StockPlaceName,      //收货部门
                payName = tbSellct.payName,                      //实物付
                furlName = tbSellct.furlName,                    //实物收
                Remarks = tbSellct.Remarks,                      //备注

                RegisterName = tbSellct.RegisterName,            //制单
                registerTime = tbSellct.RegisterTime.ToString(), //时间
            }).ToList();


            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.SellRetuerID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).            //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #10
0
        // <summary>
        ///查询盘点计划
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectCheck(Vo.BsgridPage bsgridPage)
        {
            string   dateTimeNow = DateTime.Now.ToString("yyyy-MM-dd");//获取当前时间
            DateTime d           = Convert.ToDateTime(dateTimeNow);
            var      linq        = (from tbGoodBiao in MyModels.B_CheckRemerbenList
                                    join tbStock in MyModels.S_StockPlaceList on tbGoodBiao.StockPlaceID equals tbStock.StockPlaceID
                                    where tbGoodBiao.PablData == d
                                    select new LY.WareHouseDeitaLL
            {
                CheckRermeberID = tbGoodBiao.CheckRermeberID,
                PablData = tbGoodBiao.PablData.ToString(),
                CommodityType = tbGoodBiao.CommodityType,
                DrugType = tbGoodBiao.DrugType,

                StockPlaceName = tbStock.StockPlaceName,
                ExamineName = tbGoodBiao.ExamineName,
                ExamineTime = tbGoodBiao.ExamineTime.ToString(),
            }).ToList();
            int totalRow = linq.Count();

            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.GoodsChopID). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #11
0
        /// <summary>
        /// 查询配货单
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectConverList(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbConverlist in MyModels.B_ConverList
                        join tbFaHuoBuMen in MyModels.S_SpouseBRanchList on tbConverlist.SpouseBRanchID equals tbFaHuoBuMen.SpouseBRanchID
                        join tbShouHuoBuMen in MyModels.S_StockPlaceList on tbConverlist.StockPlaceID equals tbShouHuoBuMen.StockPlaceID
                        where tbConverlist.ExamineNot == true
                        select new LY.PeiHuoDan
            {
                ConverID = tbConverlist.ConverID,            //id
                P_Remember = tbConverlist.P_Remember,        //编号
                payName = tbConverlist.payName,
                furlName = tbConverlist.furlName,
                SpouseBRanchName = tbFaHuoBuMen.SpouseBRanchName,
                StockPlaceName = tbShouHuoBuMen.StockPlaceName,
                Remarks = tbConverlist.Remarks
            }).ToList();

            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.ConverID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #12
0
        //不用了
        //public ActionResult ChaXunWareFonGuiTai(Vo.BsgridPage bsgridPage)
        //{
        //    //tbWaerHouse.ExamineNot == true && tbWaerHouse.Status == true && tbWaerHouse.CrushRedNot == false &&
        //    var Linq = from tbWaerHouse in myModels.B_WareHouseList
        //               join tbStoucRcu in myModels.S_StockPlaceList on tbWaerHouse.StockPlaceID equals tbStoucRcu.StockPlaceID
        //               join tbStall in myModels.B_StaffList on tbWaerHouse.StaffID equals tbStall.StaffID//员工
        //               join tbQuFen in myModels.S_QuFenLeiXingList on tbWaerHouse.QuFenLeiXingID equals tbQuFen.QuFenLeiXingID//区分类型

        //               join tbHeTong in myModels.B_OrderFormPactList on tbWaerHouse.OrderFormPactID equals tbHeTong.OrderFormPactID//合同
        //               join tbSupplier in myModels.B_SupplierList on tbHeTong.SupplierID equals tbSupplier.SupplierID//供货商
        //               join tbJieSuan in myModels.S_MethodOfSettlingAccountsList on tbHeTong.MethodOfSettlingAccountsID equals tbJieSuan.MethodOfSettlingAccountsID//结算

        //               join tbWanHouDateil in myModels.B_WareHouseDetiailList on tbWaerHouse.WareHouseID equals tbWanHouDateil.WareHouseID//明细
        //               join tbGoods in myModels.B_GoodsList on tbWanHouDateil.OrderFormDetailID equals tbGoods.GoodsID
        //               join tbCheckemDateil in myModels.B_CheckRemerbenDetillList on tbGoods.GoodsID equals tbCheckemDateil.GoodsID//明细
        //               join tbChemckem in myModels.B_CheckRemerbenList on tbCheckemDateil.CheckRermeberID equals tbChemckem.CheckRermeberID

        //               where tbStoucRcu.StockPlaceID == 4
        //               select new LY.WareHouseDeitaLL
        //               {
        //                   WareHouseID = tbWaerHouse.WareHouseID,//进仓ID
        //                   Remember = tbWaerHouse.Remember,//进仓编号
        //                   OrderFormPactID = tbHeTong.OrderFormPactID,//合同ID
        //                   ContractNumber = tbHeTong.ContractNumber,//合同编号
        //                   MethodOfSettlingAccounts = tbJieSuan.MethodOfSettlingAccounts,//结算方式
        //                   SupplierCHName = tbSupplier.SupplierCHName,//供货商名称
        //                   StaffCode = tbStall.StaffCode,//员工编号
        //                   StaffName = tbStall.StaffName,//姓名
        //                   RegisterTime = tbWaerHouse.RegisterTime.ToString(),//登记时间
        //                   ExamineNot = tbWaerHouse.ExamineNot,//审核状态
        //                   Status = tbWaerHouse.Status,//生效状态
        //                   CrushRedNot = tbWaerHouse.CrushRedNot,//冲红状态

        //                   QuFenLeiXingMC = tbQuFen.QuFenLeiXingMC//区分
        //               };
        //    int totalRow = Linq.Count();
        //    List<LY.WareHouseDeitaLL> notices = Linq.OrderByDescending(p => p.WareHouseID).//noboer表达式
        //        Skip(bsgridPage.GetStartIndex()).//F12(看)
        //        Take(bsgridPage.pageSize).
        //        ToList();

        //    Vo.Bsgrid<LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid<LY.WareHouseDeitaLL>();
        //    bsgrid.success = true;
        //    bsgrid.totalRows = totalRow;//总的行数
        //    bsgrid.curPage = bsgridPage.curPage;//请求当前页
        //    bsgrid.data = notices;//查出的数据
        //    return Json(bsgrid, JsonRequestBehavior.AllowGet);
        //}


        /// <summary>
        /// 查询对应商品(二)
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult ChaXunShangPinPanl(Vo.BsgridPage bsgridPage, int goodsID)
        {
            var Linq = (from tbSelectGoods in myModels.B_GoodsList//商品
                        join tbPanlDateil in myModels.B_CheckRemerbenDetillList on tbSelectGoods.GoodsID equals tbPanlDateil.GoodsID
                        join tbCheckRem in myModels.B_CheckRemerbenList on tbPanlDateil.CheckRermeberID equals tbCheckRem.CheckRermeberID
                        where tbSelectGoods.GoodsID == goodsID
                        select new LY.PeiHuoDan
            {
                GoodsIDs = tbSelectGoods.GoodsID,            //商品ID
                MumberOfPackages = tbPanlDateil.MumberOfPackages,
                Subdivision = tbPanlDateil.Subdivision,
                Number = tbPanlDateil.SunYiShu,
                SpouseBRanchNsame = tbCheckRem.CommodityType,
                registerTime = tbCheckRem.PablData.ToString(),
            }).ToList();

            int totalRow = Linq.Count();
            List <LY.PeiHuoDan> notices = Linq.OrderByDescending(p => p.WareHouseID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #13
0
        /// <summary>
        /// 绑定合同
        /// </summary>
        /// <returns></returns>
        public ActionResult BangOrderFrom(Vo.BsgridPage bsgridPage, int OrderFormPact)
        {
            var linq = (from tbOrderFrom in MyModels.B_OrderFormPactList
                        where tbOrderFrom.OrderFormPactID == OrderFormPact
                        select new LY.WareHouseDeitaLL
            {
                OrderFormPactID = tbOrderFrom.OrderFormPactID,
                ContractNumber = tbOrderFrom.ContractNumber,
                ValidBegin = tbOrderFrom.ValidBegin.ToString(),
                ValidTip = tbOrderFrom.ValidTip.ToString()
            }).ToList();
            int totalRow = linq.Count();

            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.OrderFormPactID). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).               //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #14
0
        /// <summary>
        /// 根据所选的 合同ID(查询商品表)
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectShangPin(Vo.BsgridPage bsgridPage, int orderformPactID1)
        {
            var linq = (from tbSelect in myModels.B_DefaulGoodsList                                                                           //缺省表
                        join tbSelectDetail in myModels.B_DefaulGoodsDetaiLList on tbSelect.DefaulGoodsID equals tbSelectDetail.DefaulGoodsID //缺省明细表
                        join tbGoods in myModels.B_GoodsList on tbSelectDetail.GoodsID equals tbGoods.GoodsID                                 //商品表
                        join tbHeTong in myModels.B_OrderFormPactList on tbSelect.OrderFormPactID equals tbHeTong.OrderFormPactID             //合同表
                        where tbSelect.OrderFormPactID == orderformPactID1
                        select new LY.DefaulGoods
            {
                DefaulGoodsID = tbSelect.DefaulGoodsID,                     //缺省商品表ID
                DefaulGoodsDetaiLLID = tbSelectDetail.DefaulGoodsDetaiLLID, //缺省商品明细表ID

                GoodsIDs = tbGoods.GoodsID,                                 //商品ID
                GoodsCodes = tbGoods.GoodsCode,                             //商品代码
                GoodsTiaoMas = tbGoods.GoodsTiaoMa,                         //商品条码
                GoodsNames = tbGoods.GoodsName,                             //商品名称
                ArtNos = tbGoods.ArtNo,                                     //商品货号
            }).ToList();

            int totalRow = linq.Count();
            List <LY.DefaulGoods> notices = linq.OrderByDescending(p => p.DefaulGoodsID). //noboer表达式
                                            Skip(bsgridPage.GetStartIndex()).             //F12(看)
                                            Take(bsgridPage.pageSize).
                                            ToList();

            Vo.Bsgrid <LY.DefaulGoods> bsgrid = new Vo.Bsgrid <LY.DefaulGoods>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #15
0
        /// <summary>
        /// 查询商品代码
        /// </summary>
        /// <returns></returns>
        public ActionResult BangFanChangGoodel(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbShangPin in myModels.B_GoodsList                                                                //商品

                        join tbGoodDetail in myModels.B_GoodsDetailList on tbShangPin.GoodsID equals tbGoodDetail.GoodsID      //商品明细
                        join tbPackln in myModels.S_PackInfoIDList on tbGoodDetail.GoodsDetailID equals tbPackln.GoodsDetailID //包装信息表

                        select new LY.PeiHuoDan
            {
                GoodsIDs = tbShangPin.GoodsID,
                GoodsCode = tbShangPin.GoodsCode,
                GoodsName = tbShangPin.GoodsName,
            }).ToList();
            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.GoodsCode). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).         //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #16
0
        ///查询对应部门(右)
        /// </summary>
        /// <returns></returns>
        public ActionResult SelecBuMnesright(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbChterm in myModels.B_CheckRemerbenList
                        join tbDruyt in myModels.B_PanlList on tbChterm.DrugTypeID equals tbDruyt.DrugTypeID
                        select new LY.WareHouseDeitaLL
            {
                PablData = tbChterm.PablData.ToString(),
                DrugType = tbDruyt.DrugType,
                DrugTypeID = tbDruyt.DrugTypeID
            }).ToList();


            int totalRow = linq.Count();
            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.GoodsChopID).//noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #17
0
        /// <summary>
        /// 联营合同查询
        /// </summary>
        /// <returns></returns>
        public ActionResult LianYingHeTong(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbSelectOrPac in myModels.B_OrderFormPactList                                                                                                              //合同表
                        join tbHeTongLeiXing in myModels.S_AgreementTypeList on tbSelectOrPac.AgreementTypeID equals tbHeTongLeiXing.AgreementTypeID                                    //合同类型
                        join tbJieSuanFangShi in myModels.S_MethodOfSettlingAccountsList on tbSelectOrPac.MethodOfSettlingAccountsID equals tbJieSuanFangShi.MethodOfSettlingAccountsID //结算方式
                        join tbSutall in myModels.B_SupplierList on tbSelectOrPac.SupplierID equals tbSutall.SupplierID                                                                 //供货商
                        where tbHeTongLeiXing.AgreementTypeID == 3
                        select new LY.SelectOrderPact
            {
                OrderFormPactID = tbSelectOrPac.OrderFormPactID,                      //合同ID
                ContractNumber = tbSelectOrPac.ContractNumber,                        //合同号
                AgreementTypeName = tbHeTongLeiXing.AgreementTypeName,                //合同类型
                MethodOfSettlingAccounts = tbJieSuanFangShi.MethodOfSettlingAccounts, //结算方式
                SupplierCHName = tbSutall.SupplierCHName,                             //供货商名称
                ContractValidRised = tbSelectOrPac.ValidBegin.ToString(),             //合同有效期(起)
                ContractValidBegins = tbSelectOrPac.ValidTip.ToString(),              //合同有效期(始)
                ConclusionTimes = tbSelectOrPac.ConclusionTime.ToString(),            //签订时间
                ConclusionSite = tbSelectOrPac.ConclusionSite,                        //签订地点
            }).ToList();
            int totalRow = linq.Count();
            List <LY.SelectOrderPact> notices = linq.OrderByDescending(p => p.OrderFormPactID). //noboer表达式
                                                Skip(bsgridPage.GetStartIndex()).               //F12(看)
                                                Take(bsgridPage.pageSize).
                                                ToList();

            Vo.Bsgrid <LY.SelectOrderPact> bsgrid = new Vo.Bsgrid <LY.SelectOrderPact>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #18
0
        /// <summary>
        /// 查询合同单
        /// </summary>
        /// <returns></returns>
        public ActionResult SeleHeTong(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbPeiHuo in MyModels.B_ConverList
                        join tbJinCang in MyModels.B_WareHouseList on tbPeiHuo.WareHouseID equals tbJinCang.WareHouseID
                        join tbHeTong in MyModels.B_OrderFormPactList on tbJinCang.OrderFormPactID equals tbHeTong.OrderFormPactID
                        join tbGongHuo in MyModels.B_SupplierList on tbHeTong.SupplierID equals tbGongHuo.SupplierID
                        join tbHeSuan in MyModels.S_AdjustAccountsFashionList on tbHeTong.AdjustAccountsFashionID equals tbHeSuan.AdjustAccountsFashionID
                        where tbPeiHuo.ExamineNot == true
                        select new LY.PeiHuoDan
            {
                ConverID = tbPeiHuo.ConverID,
                ContractNumber = tbHeTong.ContractNumber,
                SupplierCHName = tbGongHuo.SupplierCHName,
                AdjustAccountsFashion = tbHeSuan.AdjustAccountsFashion
            }).ToList();


            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.WareHouseID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #19
0
        /// <summary>
        /// 查询商品代码(一)
        public ActionResult SelectSellctGoods(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbSellct in myModels.B_SellList                                                                              //销售单
                        join tbSellDatelst in myModels.B_SellDeTaLsit on tbSellct.SellID equals tbSellDatelst.SellID                      //销售明细单
                        join tbConverDaTe in myModels.B_ConverDeTailList on tbSellDatelst.ConverDeTaiID equals tbConverDaTe.ConverDeTaiID //配货明细单
                        join tbGoods in myModels.B_GoodsList on tbConverDaTe.GoodsID equals tbGoods.GoodsID                               //商品
                        select new LY.PeiHuoDan
            {
                GoodsIDs = tbGoods.GoodsID,            //商品id
                GoodsCode = tbGoods.GoodsCode,         //代码
                GoodsNames = tbGoods.GoodsName,        //商品名称
            }).ToList();
            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.SellID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).      //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #20
0
        /// <summary>
        /// 绑定调整单商品(
        /// </summary>
        /// <returns></returns>
        public ActionResult DuiYingSdSellctGoodsfd(Vo.BsgridPage bsgridPage, int AllocateID)
        {
            var linq = (from tbConverlist in myModels.B_SellCheckBatchList
                        join tbSeChdeDetail in myModels.B_SellCheckBatchDetaiList on tbConverlist.SellCheckBatchID equals tbSeChdeDetail.SellCheckBatchID //明细
                        join tbConverDaTe in myModels.B_ConverDeTailList on tbSeChdeDetail.ConverDeTaiID equals tbConverDaTe.ConverDeTaiID                //配货明细单
                        join tbGoods in myModels.B_GoodsList on tbConverDaTe.GoodsID equals tbGoods.GoodsID                                               //商品


                        join tbJiLiangDanWei in myModels.S_EstimateUnitList on tbGoods.EstimateUnitID equals tbJiLiangDanWei.EstimateUnitID //计量单位
                        join tbGoodDetail in myModels.B_GoodsDetailList on tbGoods.GoodsID equals tbGoodDetail.GoodsID                      //商品明细


                        where tbSeChdeDetail.SellCheckBatchID == AllocateID
                        select new LY.PeiHuoDan
            {
                GoodsNames = tbGoods.GoodsName,
                MumberOfPackages = tbConverDaTe.MumberOfPackages,            //
                Subdivision = tbSeChdeDetail.MumberOfPackages,
                RetailMonovalents = tbGoodDetail.RetailMonovalent,           //零售单价
                Number = tbConverDaTe.Number,
            }).ToList();

            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.ConverID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #21
0
        /// <summary>
        /// 查询销售单
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="stockPlaceID"></param>
        /// <returns></returns>
        public ActionResult SelectSellct(Vo.BsgridPage bsgridPage)
        {
            var linq = (from tbSellct in MyModels.B_SellList//销售单

                        join tbSpuBuMen in MyModels.S_SpouseBRanchList on tbSellct.SpouseBRanchID equals tbSpuBuMen.SpouseBRanchID
                        where tbSellct.ExamineNot == true
                        select new LY.PeiHuoDan
            {
                SellID = tbSellct.SellID,                        //销售id
                Remember = tbSellct.Remember,                    //销售单编号
                SpouseBRanchName = tbSpuBuMen.SpouseBRanchName,  //新部门
                PanlDate = tbSellct.PanlDate.ToString(),         //启动计划日期
                RegisterName = tbSellct.RegisterName,            //制单人
                registerTime = tbSellct.RegisterTime.ToString(), //制单时间
            }).ToList();


            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.ConverID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #22
0
        /// <summary>
        /// 查询商标
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="stockPlaceID"></param>
        /// <returns></returns>
        public ActionResult SelectBangDingPeiHuo(Vo.BsgridPage bsgridPage, int stockPlaceID, int converID)
        {
            var linq = (from tbConverlist in MyModels.B_ConverList
                        join tbConverDaTe in MyModels.B_ConverDeTailList on tbConverlist.ConverID equals tbConverDaTe.ConverID //配货明细
                        join tbGoods in MyModels.B_GoodsList on tbConverDaTe.GoodsID equals tbGoods.GoodsID                    //商品
                        join tbShangBiao in MyModels.B_GoodsChopList on tbGoods.GoodsChopID equals tbShangBiao.GoodsChopID     //商标
                        where tbConverlist.StockPlaceID == stockPlaceID && tbConverlist.ConverID == converID
                        select new LY.PeiHuoDan
            {
                ConverID = tbConverlist.ConverID,            //id
                GoodsIDs = tbGoods.GoodsID,
                GoodsCode = tbGoods.GoodsCode,
                GoodsChopName = tbShangBiao.GoodsChopName,
            }).ToList();


            int totalRow = linq.Count();
            List <LY.PeiHuoDan> notices = linq.OrderByDescending(p => p.ConverID). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #23
0
        /// <summary>
        /// 查询销售(起)条件
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <param name="stockPlaceID"></param>
        /// <returns></returns>
        public ActionResult SelectBSellHuo(Vo.BsgridPage bsgridPage, int spouseBRanchID)
        {
            var linq = (from tbYaoHuo in MyModels.B_WanManifestList                                                                         //要货单
                        join tbBuMne in MyModels.S_SpouseBRanchList on tbYaoHuo.PurchaseSectionID equals tbBuMne.SpouseBRanchID
                        join tbSellDatelst in MyModels.B_WanManifestDetailList on tbYaoHuo.WanManifestID equals tbSellDatelst.WanManifestID //销售明细单
                        join tbGoods in MyModels.B_GoodsList on tbSellDatelst.GoodsID equals tbGoods.GoodsID                                //商品
                        join tbShangBiao in MyModels.B_GoodsChopList on tbGoods.GoodsChopID equals tbShangBiao.GoodsChopID                  //商标
                        join tbJiLiangDanWei in MyModels.S_EstimateUnitList on tbGoods.EstimateUnitID equals tbJiLiangDanWei.EstimateUnitID //计量单位
                        join tbGoodDetail in MyModels.B_GoodsDetailList on tbGoods.GoodsID equals tbGoodDetail.GoodsID                      //商品明细
                        where tbYaoHuo.PurchaseSectionID == spouseBRanchID

                        select new LY.WareHouseDeitaLL
            {
                SupplierID = tbYaoHuo.WanManifestID,
                SpouseBRanchName = tbBuMne.SpouseBRanchName,
                RegisterName = tbYaoHuo.RegisterName,
                //FactPrice = tbGoodDetail.FactPrice * tbSellDatelst.MumberOfPackages,//商品单价(销售价)
                RegisterTime = tbYaoHuo.RegisterTime.ToString(),
            }).ToList();


            int totalRow = linq.Count();
            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.IncreaseID). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).          //F12(看)
                                                 Take(bsgridPage.pageSize).ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #24
0
        /// <summary>
        /// 绑定商品类型
        /// </summary>
        /// <returns></returns>
        public ActionResult BangDGoodsClass(Vo.BsgridPage bsgridPage, int goodsClassifyID)
        {
            var linq = (from tbGoodClass in MyModels.B_GoodsClassifyList
                        where tbGoodClass.GoodsClassifyID == goodsClassifyID
                        select new LY.WareHouseDeitaLL
            {
                GoodsClassifyID = tbGoodClass.GoodsClassifyID,
                Code = tbGoodClass.Code,
                GoodsClassifyName = tbGoodClass.GoodsClassifyName
            }).ToList();

            int totalRow = linq.Count();

            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.GoodsClassifyID). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).               //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #25
0
        /// <summary>
        /// 查询商品 信息
        /// </summary>
        /// <returns></returns>
        public ActionResult SelectStudentA(BsgridPage bsgridPage) //查询信息
        {
            var linq = 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,
            };
            int totalRow = linq.Count();
            List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.DfrugTypeID).
                                                 Skip(bsgridPage.GetStartIndex()).//F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #26
0
        /// <summary>
        /// 查询进仓单(一)
        /// </summary>
        /// <param name="bsgridPage"></param>
        /// <returns></returns>
        public ActionResult ChaXunWareFonZongHe(Vo.BsgridPage bsgridPage, int quFenLeiXingID, int stockPlaceID)
        {
            //进仓、员工、类型、合同、供货商、结算方式
            var Linq = from tbWaerHouse in myModels.B_WareHouseList
                       join tbStoucRcu in myModels.S_StockPlaceList on tbWaerHouse.StockPlaceID equals tbStoucRcu.StockPlaceID
                       join tbStall in myModels.B_StaffList on tbWaerHouse.StaffID equals tbStall.StaffID                                                           //员工
                       join tbQuFen in myModels.S_QuFenLeiXingList on tbWaerHouse.QuFenLeiXingID equals tbQuFen.QuFenLeiXingID                                      //区分类型

                       join tbHeTong in myModels.B_OrderFormPactList on tbWaerHouse.OrderFormPactID equals tbHeTong.OrderFormPactID                                 //合同
                       join tbSupplier in myModels.B_SupplierList on tbHeTong.SupplierID equals tbSupplier.SupplierID                                               //供货商
                       join tbJieSuan in myModels.S_MethodOfSettlingAccountsList on tbHeTong.MethodOfSettlingAccountsID equals tbJieSuan.MethodOfSettlingAccountsID //结算
                       where tbWaerHouse.ExamineNot == true && tbWaerHouse.Status == true && tbWaerHouse.CrushRedNot == false
                       select new LY.WareHouseDeitaLL
            {
                WareHouseID              = tbWaerHouse.WareHouseID,            //进仓ID
                StockPlaceID             = tbStoucRcu.StockPlaceID,
                Remember                 = tbWaerHouse.Remember,               //进仓编号
                OrderFormPactID          = tbHeTong.OrderFormPactID,           //合同ID
                ContractNumber           = tbHeTong.ContractNumber,            //合同编号
                MethodOfSettlingAccounts = tbJieSuan.MethodOfSettlingAccounts, //结算方式
                SupplierCHName           = tbSupplier.SupplierCHName,          //供货商名称
                StaffID        = tbStall.StaffID,                              //员工ID
                StaffCode      = tbStall.StaffCode,                            //员工编号
                StaffName      = tbStall.StaffName,                            //姓名
                RegisterTime   = tbWaerHouse.RegisterTime.ToString(),          //登记时间
                ExamineNot     = tbWaerHouse.ExamineNot,                       //审核状态
                Status         = tbWaerHouse.Status,                           //生效状态
                CrushRedNot    = tbWaerHouse.CrushRedNot,                      //冲红状态
                QuFenLeiXingID = tbQuFen.QuFenLeiXingID,                       //区分ID
                QuFenLeiXingMC = tbQuFen.QuFenLeiXingMC                        //区分
            };


            if (quFenLeiXingID > 0)
            {
                Linq = Linq.Where(p => p.QuFenLeiXingID == quFenLeiXingID);
            }

            if (stockPlaceID > 0)
            {
                Linq = Linq.Where(p => p.StockPlaceID == stockPlaceID);
            }

            int totalRow = Linq.Count();
            List <LY.WareHouseDeitaLL> notices = Linq.OrderByDescending(p => p.WareHouseID). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #27
0
        /// <summary>
        /// 选择绑定 订单(商品)到页面(2)
        /// </summary>
        /// <returns></returns>
        public ActionResult BfdangDingShangPin(Vo.BsgridPage bsgridPage, string goodsCode)
        {
            try
            {
                var linq = (from tbOrderFormDeill in myModels.B_OrderFormDetailList//订单明细
                            join tbOrderForm in myModels.B_OrderFormList on tbOrderFormDeill.OrderFormID equals tbOrderForm.OrderFormID
                            join tbOrderFormPactID in myModels.B_OrderFormPactList on tbOrderForm.OrderFormPactID equals tbOrderFormPactID.OrderFormPactID
                            join tbGongHuo in myModels.B_SupplierList on tbOrderFormPactID.SupplierID equals tbGongHuo.SupplierID

                            join tbShangPin in myModels.B_GoodsList on tbOrderFormDeill.GoodsID equals tbShangPin.GoodsID                          //商品
                            join tbShangPinDeill in myModels.B_GoodsDetailList on tbShangPin.GoodsID equals tbShangPinDeill.GoodsID                //商品明细

                            join tbBaoZhuangXin in myModels.S_PackInfoIDList on tbShangPinDeill.GoodsDetailID equals tbBaoZhuangXin.GoodsDetailID  //包装信息

                            join tbJiLiangDanWei in myModels.S_EstimateUnitList on tbShangPin.EstimateUnitID equals tbJiLiangDanWei.EstimateUnitID //计量单位
                            where tbShangPin.GoodsCode == goodsCode
                            select new LY.SelectListDingDan
                {
                    ContractNumber = tbOrderFormPactID.ContractNumber,
                    ValidTip = tbOrderFormPactID.ValidTip.ToString(),
                    ValidBegin = tbOrderFormPactID.ValidBegin.ToString(),
                    SupplierNumber = tbGongHuo.SupplierNumber,
                    SupplierCHName = tbGongHuo.SupplierCHName,

                    GoodsIDs = tbShangPinDeill.GoodsID,
                    GoodsCodes = tbShangPin.GoodsCode,                     //商品代码
                    GoodsTiaoMas = tbShangPin.GoodsTiaoMa,                 //商品条码
                    GoodsNames = tbShangPin.GoodsName,                     //商品名称
                    ArtNos = tbShangPin.ArtNo,                             //商品货号
                    SpecificationsModels = tbShangPin.SpecificationsModel, //规格
                    EstimateUnitNames = tbJiLiangDanWei.EstimateUnitName,  //计量单位
                    TaxBids = tbShangPinDeill.TaxBid,                      //含税进价
                    RetailMonovalents = tbShangPinDeill.RetailMonovalent,  //零售单价
                }).ToList();

                int totalRow = linq.Count();
                List <LY.SelectListDingDan> notices = linq.OrderByDescending(p => p.OrderFormID). //noboer表达式
                                                      Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                                      Take(bsgridPage.pageSize).
                                                      ToList();

                Vo.Bsgrid <LY.SelectListDingDan> bsgrid = new Vo.Bsgrid <LY.SelectListDingDan>();
                bsgrid.success   = true;
                bsgrid.totalRows = totalRow;           //总的行数
                bsgrid.curPage   = bsgridPage.curPage; //请求当前页
                bsgrid.data      = notices;            //查出的数据
                return(Json(bsgrid, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(Json("", JsonRequestBehavior.AllowGet));
            }
        }
예제 #28
0
        /// <summary>
        /// 绑定商品到(主界面)
        /// </summary>
        /// <returns></returns>
        public ActionResult BangDingPiGoodel(Vo.BsgridPage bsgridPage, Array jiLuChaekID)
        {
            List <PeiHuoDan> list = new List <PeiHuoDan>();
            // int goodsIDs
            string Z = ((string[])jiLuChaekID)[0];

            string[] intsZ = Z.Split(',');

            for (int P = 0; P < intsZ.Length;)
            {
                var goodsIDs = Convert.ToInt32(intsZ[P]);
                var linq     = (from tbSellct in MyModels.B_SellList                                                                                //销售单
                                join tbSellDatelst in MyModels.B_SellDeTaLsit on tbSellct.SellID equals tbSellDatelst.SellID                        //销售明细单
                                join tbBumen in MyModels.S_SpouseBRanchList on tbSellct.SpouseBRanchID equals tbBumen.SpouseBRanchID
                                join tbConverDaTe in MyModels.B_ConverDeTailList on tbSellDatelst.ConverDeTaiID equals tbConverDaTe.ConverDeTaiID   //配货明细单
                                join tbGoods in MyModels.B_GoodsList on tbConverDaTe.GoodsID equals tbGoods.GoodsID                                 //商品
                                join tbJiLiangDanWei in MyModels.S_EstimateUnitList on tbGoods.EstimateUnitID equals tbJiLiangDanWei.EstimateUnitID //计量单位
                                join tbGoodDetail in MyModels.B_GoodsDetailList on tbGoods.GoodsID equals tbGoodDetail.GoodsID                      //商品明细
                                join tbPackln in MyModels.S_PackInfoIDList on tbGoodDetail.GoodsDetailID equals tbPackln.GoodsDetailID              //包装信息表
                                where tbSellDatelst.SellDeTaliID == goodsIDs
                                select new LY.PeiHuoDan
                {
                    SellDeTaliID = tbSellDatelst.SellDeTaliID,            //销售明细id
                    GoodsIDs = tbGoods.GoodsID,                           //商品id
                    GoodsCode = tbGoods.GoodsCode,                        //代码
                    GoodsNames = tbGoods.GoodsName,                       //商品名称
                    PackContents = tbPackln.PackContent,                  //包装含量
                    GoodsTiaoMas = tbGoods.GoodsTiaoMa,                   //商品条码
                    MumberOfPackages = tbConverDaTe.MumberOfPackages,     //
                    RetailMonovalents = tbGoodDetail.RetailMonovalent,    //零售单价
                    SpecificationsModels = tbGoods.SpecificationsModel,   //规格
                    EstimateUnitNames = tbJiLiangDanWei.EstimateUnitName, //计量单位
                    ArtNos = tbGoods.ArtNo,                               //商品货号
                    SpouseBRanchName = tbBumen.SpouseBRanchName,          //商品货号
                    TaxBids = tbGoodDetail.TaxBid,                        //含税进价
                }).ToList();
                list.AddRange(linq);
                P++;
            }
            int totalRow = list.Count();
            List <LY.PeiHuoDan> notices = list.OrderByDescending(p => p.GoodsIDs). //noboer表达式
                                          Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                          Take(bsgridPage.pageSize).
                                          ToList();

            Vo.Bsgrid <LY.PeiHuoDan> bsgrid = new Vo.Bsgrid <LY.PeiHuoDan>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }
예제 #29
0
        /// <summary>
        ///  点击选择“进仓单”绑定到界面( 附 带 商品table)(二)
        /// </summary>
        /// <returns></returns>

        public ActionResult BangSahfnJinCangShangPin(Vo.BsgridPage bsgridPage, int WareHouseID1)
        {
            try
            {
                var linq = (from tbSelectWanHtsList in myModels.B_WareHouseList                                                                        //进仓单ID
                            join tbWanHofDeaill in myModels.B_WareHouseDetiailList on tbSelectWanHtsList.WareHouseID equals tbWanHofDeaill.WareHouseID //进仓明细

                            join tbShangPin in myModels.B_GoodsList on tbWanHofDeaill.OrderFormDetailID equals tbShangPin.GoodsID                      //商品

                            join tbShangPinDeill in myModels.B_GoodsDetailList on tbShangPin.GoodsID equals tbShangPinDeill.GoodsID                    //商品明细
                            join tbPackln in myModels.S_PackInfoIDList on tbShangPinDeill.GoodsDetailID equals tbPackln.GoodsDetailID                  //包装信息表
                            join tbJiLiangDanWei in myModels.S_EstimateUnitList on tbShangPin.EstimateUnitID equals tbJiLiangDanWei.EstimateUnitID     //计量单位

                            where tbWanHofDeaill.WareHouseID == WareHouseID1                                                                           //根据进仓明细中的“进仓ID”
                            select new LY.WareHouseDeitaLL
                {
                    WareHouseDetiailID = tbWanHofDeaill.WareHouseDetiailID, //进仓明细ID
                    WareHouseID = tbSelectWanHtsList.WareHouseID,           //进仓ID
                    GoodsIDs = tbShangPin.GoodsID,                          //商品ID
                    GoodsCodes = tbShangPin.GoodsCode,                      //商品代码
                    GoodsTiaoMas = tbShangPin.GoodsTiaoMa,                  //商品条码
                    GoodsNames = tbShangPin.GoodsName,                      //商品名称
                    ArtNos = tbShangPin.ArtNo,                              //商品货号
                    SpecificationsModels = tbShangPin.SpecificationsModel,  //规格
                    EstimateUnitNames = tbJiLiangDanWei.EstimateUnitName,   //计量单位
                    TaxBids = tbShangPinDeill.TaxBid,                       //含税进价
                    PackInfos = tbPackln.PackContent,                       //包装含量

                    RetailMonovalents = tbShangPinDeill.RetailMonovalent,   //零售单价
                    MumberOfPackages = tbWanHofDeaill.MumberOfPackages,     //进仓件数
                    Subdivision = tbWanHofDeaill.Subdivision,               //入库细数
                }).ToList();

                int totalRow = linq.Count();
                List <LY.WareHouseDeitaLL> notices = linq.OrderByDescending(p => p.WareHouseID). //noboer表达式
                                                     Skip(bsgridPage.GetStartIndex()).           //F12(看)
                                                     Take(bsgridPage.pageSize).
                                                     ToList();

                Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
                bsgrid.success   = true;
                bsgrid.totalRows = totalRow;
                bsgrid.curPage   = bsgridPage.curPage;
                bsgrid.data      = notices;
                return(Json(bsgrid, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(Json("", JsonRequestBehavior.AllowGet));
            }
        }
예제 #30
0
        /// <summary>
        /// 绑定商品到(主界面)
        /// </summary>
        /// <returns></returns>
        public ActionResult BangDingPiGoodel(Vo.BsgridPage bsgridPage, Array jiLuChaekID)
        {
            List <WareHouseDeitaLL> list = new List <WareHouseDeitaLL>();
            // int goodsIDs
            string Z = ((string[])jiLuChaekID)[0];

            string[] intsZ = Z.Split(',');

            for (int P = 0; P < intsZ.Length;)
            {
                var goodsIDs = Convert.ToInt32(intsZ[P]);
                var linq     = (from tbGoods in MyModels.B_GoodsList                                                                                 //商品
                                join tbGoodChoClass in MyModels.B_GoodsClassifyList on tbGoods.GoodsClassifyID equals tbGoodChoClass.GoodsClassifyID //商品分类
                                join tbShangBiao in MyModels.B_GoodsChopList on tbGoods.GoodsChopID equals tbShangBiao.GoodsChopID                   //商标

                                join tbJiLiangDanWei in MyModels.S_EstimateUnitList on tbGoods.EstimateUnitID equals tbJiLiangDanWei.EstimateUnitID  //计量单位
                                join tbGoodDetail in MyModels.B_GoodsDetailList on tbGoods.GoodsID equals tbGoodDetail.GoodsID                       //商品明细
                                join tbBaoZhuangXin in MyModels.S_PackInfoIDList on tbGoodDetail.GoodsDetailID equals tbBaoZhuangXin.GoodsDetailID   //包装信息
                                where tbGoods.GoodsID == goodsIDs

                                select new LY.WareHouseDeitaLL
                {
                    //CheckRermeberID = tbChredgRe.CheckRermeberID,
                    //CheckRemerbenDetillD = tbChredgReDateil.CheckRemerbenDetillD,
                    GoodsIDs = tbGoods.GoodsID,
                    GoodsCodes = tbGoods.GoodsCode,                       //代码
                    GoodsNames = tbGoods.GoodsName,                       //商品名称

                    GoodsTiaoMas = tbGoods.GoodsTiaoMa,                   //商品条码

                    ArtNos = tbGoods.ArtNo,                               //商品货号

                    PackInfos = tbBaoZhuangXin.PackContent,               //包装含量

                    EstimateUnitNames = tbJiLiangDanWei.EstimateUnitName, //计量单位
                }).ToList();
                list.AddRange(linq);
                P++;
            }
            int totalRow = list.Count();
            List <LY.WareHouseDeitaLL> notices = list.OrderByDescending(p => p.GoodsIDs). //noboer表达式
                                                 Skip(bsgridPage.GetStartIndex()).        //F12(看)
                                                 Take(bsgridPage.pageSize).
                                                 ToList();

            Vo.Bsgrid <LY.WareHouseDeitaLL> bsgrid = new Vo.Bsgrid <LY.WareHouseDeitaLL>();
            bsgrid.success   = true;
            bsgrid.totalRows = totalRow;           //总的行数
            bsgrid.curPage   = bsgridPage.curPage; //请求当前页
            bsgrid.data      = notices;            //查出的数据
            return(Json(bsgrid, JsonRequestBehavior.AllowGet));
        }