Example #1
0
        protected virtual AdvSearchCondtion SetExportConditionToObj(string condition)
        {
            AdvSearchCondtion cond = new AdvSearchCondtion();

            if (string.IsNullOrEmpty(condition) || condition.Equals("null"))
            {
                cond.Condition = new SearchCondition();
                return(cond);
            }
            ExportDataConditionModel model = JsonAppHelper.ToObject <ExportDataConditionModel>(condition);
            AdvSearchCondtionEntity  condv = JsonAppHelper.ToObject <AdvSearchCondtionEntity>(model.data);

            cond.KeyValueList = condv.KeyValueList;

            switch (model.type)
            {
            case 0:
                var keyword = JsonAppHelper.ToObject <KeywordValueModel>(condv.Condition);
                if (keyword == null)
                {
                    cond.Condition = new SearchCondition();
                }
                else
                {
                    cond.Condition = GetKeywordConditionObj(keyword.keyword, keyword.searchFiled);
                }
                break;

            case 1:
                cond.Condition = GetAdvConditionObj(JsonAppHelper.ToObject <List <AdvSearchEntity> >(condv.Condition));
                break;
            }
            return(cond);
        }
        public ActionResult GetListGridJsonPagination(string filterStr, Pagination pagination, string sidx = " F_EnCode ", string sord = "desc")
        {
            if (string.IsNullOrEmpty(sidx))
            {
                sidx = " F_EnCode ";
            }
            PagerInfo pager = GetPageInfo(pagination);
            List <AdvSearchEntity>  advSearchList = new List <AdvSearchEntity>();
            List <Mst_CustomerInfo> lista;

            if (string.IsNullOrEmpty(filterStr))
            {
                lista = baseBLL.FindWithPager(GetKeywordCondition("", filterStr), pager, sidx, sord.ToLower() == "desc");

                //advSearchList.Add(new AdvSearchEntity
                //{
                //    F_condition = "And",
                //    F_fvalue = DateTime.Now.ToString("yyyy-MM") + "-01",
                //    F_searchFiled = "F_Id",
                //    F_type = "2"
                //});

                //advSearchList.Add(new AdvSearchEntity
                //{
                //    F_condition = "And",
                //    F_fvalue = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"),
                //    F_searchFiled = "F_Id",
                //    F_type = "2"
                //});
            }
            else
            {
                CustomerFilter filter = JsonAppHelper.ToObject <CustomerFilter>(filterStr);

                if (!string.IsNullOrEmpty(filter.F_EnCode))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_EnCode,
                        F_searchFiled = "F_EnCode",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_FullName))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_FullName,
                        F_searchFiled = "F_FullName",
                        F_type        = "2"
                    });
                }
                lista = BLLFactory <Mst_Customer> .Instance.FindWithPager(GetAdvCondition(advSearchList), pager, sidx, sord.ToLower().Equals("desc"));
            }

            return(GetPagerContent <Mst_CustomerInfo>(lista, pager));
        }
Example #3
0
        public ActionResult GetListGridJsonPagination(string filterStr, Pagination pagination, string sidx = " F_EnCode ", string sord = "desc")
        {
            if (string.IsNullOrEmpty(sidx))
            {
                sidx = " F_EnCode ";
            }
            PagerInfo pager = GetPageInfo(pagination);
            List <AdvSearchEntity>  advSearchList = new List <AdvSearchEntity>();
            List <Mst_PositionInfo> lista;

            if (string.IsNullOrEmpty(filterStr))
            {
                lista = baseBLL.FindWithPager(GetKeywordCondition("", filterStr), pager, sidx, sord.ToLower() == "desc");
            }
            else
            {
                PositionFilter filter = JsonAppHelper.ToObject <PositionFilter>(filterStr);

                if (!string.IsNullOrEmpty(filter.F_EnCode))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_EnCode,
                        F_searchFiled = "F_EnCode",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_FullName))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_FullName,
                        F_searchFiled = "F_FullName",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_EnabledMark))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_EnabledMark,
                        F_searchFiled = "F_EnabledMark",
                        F_type        = "0"
                    });
                }
                lista = BLLFactory <Mst_Position> .Instance.FindWithPager(GetAdvCondition(advSearchList), pager, sidx, sord.ToLower().Equals("desc"));
            }

            return(GetPagerContent <Mst_PositionInfo>(lista, pager));
        }
Example #4
0
        //[ValidateAntiForgeryToken]
        public ActionResult submitFormMuti(SYS_BarcodeSettingMainInfo info, string dInfo, string keyValue)
        {
            List <SYS_BarcodeSettingDetailInfo> list = JsonAppHelper.ToObject <List <SYS_BarcodeSettingDetailInfo> >(dInfo);

            if (!string.IsNullOrEmpty(keyValue))
            {
                info.F_Id               = keyValue;
                info.F_LastModifyTime   = DateTime.Now;
                info.F_LastModifyUserId = CurrentUser.F_Account;
            }
            else
            {
                info.F_CreatorTime   = DateTime.Now;
                info.F_CreatorUserId = CurrentUser.F_Account;
                info.F_Id            = Guid.NewGuid().ToString();
            }


            BLLFactory <SYS_BarcodeSettingMain> .Instance.Save(info, list);

            return(Success("操作成功"));
        }
Example #5
0
        public ActionResult GetListGridJsonPagination(string filterStr, Pagination pagination, string sidx = " F_EnCode ", string sord = "desc")
        {
            if (string.IsNullOrEmpty(sidx))
            {
                sidx = " F_EnCode ";
            }
            PagerInfo pager = GetPageInfo(pagination);
            List <AdvSearchEntity> advSearchList = new List <AdvSearchEntity>();

            if (string.IsNullOrEmpty(filterStr))
            {
                advSearchList.Add(new AdvSearchEntity
                {
                    F_condition   = "And",
                    F_fvalue      = DateTime.Now.ToString("yyyy-MM") + "-01",
                    F_searchFiled = "F_Date",
                    F_type        = "5"
                });

                advSearchList.Add(new AdvSearchEntity
                {
                    F_condition   = "And",
                    F_fvalue      = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"),
                    F_searchFiled = "F_Date",
                    F_type        = "6"
                });
            }
            else
            {
                InStockFilter filter = JsonAppHelper.ToObject <InStockFilter>(filterStr);

                if (!string.IsNullOrEmpty(filter.F_EnCode))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_EnCode,
                        F_searchFiled = "F_EnCode",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_Supplier))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_Supplier,
                        F_searchFiled = "F_SupplierId",
                        F_type        = "0"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_Status))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_Status,
                        F_searchFiled = "F_Status",
                        F_type        = "0"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_SDate))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = Convert.ToDateTime(filter.F_SDate).ToString("yyyy-MM-dd"),
                        F_searchFiled = "F_Date",
                        F_type        = "5"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_EDate))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = Convert.ToDateTime(filter.F_EDate).AddDays(1).ToString("yyyy-MM-dd"),
                        F_searchFiled = "F_Date",
                        F_type        = "6"
                    });
                }
            }

            List <V_InStockNoticeHeadInfo> list = BLLFactory <V_InStockNoticeHead> .Instance.FindWithPager(GetAdvCondition(advSearchList), pager, sidx, sord.ToLower().Equals("desc"));

            return(GetPagerContent <V_InStockNoticeHeadInfo>(list, pager));
        }
Example #6
0
        public ActionResult GetListGridJsonPagination(string filterStr, Pagination pagination, string sidx = " F_EnCode ", string sord = "desc")
        {
            if (string.IsNullOrEmpty(sidx))
            {
                sidx = " F_EnCode ";
            }
            PagerInfo pager = GetPageInfo(pagination);
            List <AdvSearchEntity> advSearchList = new List <AdvSearchEntity>();
            List <Mst_SrTypeInfo>  lista;

            if (string.IsNullOrEmpty(filterStr))
            {
                lista = baseBLL.FindWithPager(GetKeywordCondition("", filterStr), pager, sidx, sord.ToLower() == "desc");
                //advSearchList.Add(new AdvSearchEntity
                //{
                //    F_condition = "And",
                //    F_fvalue = DateTime.Now.ToString("yyyy-MM") + "-01",
                //    F_searchFiled = "F_CreatorTime",
                //    F_type = "5"
                //});

                //advSearchList.Add(new AdvSearchEntity
                //{
                //    F_condition = "And",
                //    F_fvalue = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"),
                //    F_searchFiled = "F_CreatorTime",
                //    F_type = "6"
                //});
            }
            else
            {
                ProductFilter filter = JsonAppHelper.ToObject <ProductFilter>(filterStr);

                if (!string.IsNullOrEmpty(filter.F_EnCode))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_EnCode,
                        F_searchFiled = "F_EnCode",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_FullName))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_FullName,
                        F_searchFiled = "F_FullName",
                        F_type        = "2"
                    });
                }

                if (!string.IsNullOrEmpty(filter.F_ShortCode))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_ShortCode,
                        F_searchFiled = "F_ShortCode",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_ShortName))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_ShortName,
                        F_searchFiled = "F_ShortName",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_Brand))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_Brand,
                        F_searchFiled = "F_Brand",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_Standard))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_Standard,
                        F_searchFiled = "F_Standard",
                        F_type        = "2"
                    });
                }
            }

            lista = baseBLL.FindWithPager(GetKeywordCondition("", filterStr), pager, sidx, sord.ToLower() == "desc");
            return(GetPagerContent <Mst_SrTypeInfo>(lista, pager));
        }
        public ActionResult GetListGridJsonPagination(string filterStr, Pagination pagination, string sidx = " F_EnCode ", string sord = "desc")
        {
            if (string.IsNullOrEmpty(sidx))
            {
                sidx = " F_EnCode ";
            }
            List <PackList_HeadInfo> lista;
            PagerInfo pager = GetPageInfo(pagination);
            List <AdvSearchEntity> advSearchList = new List <AdvSearchEntity>();

            if (string.IsNullOrEmpty(filterStr))
            {
                lista = baseBLL.FindWithPager(GetKeywordCondition("", filterStr), pager, sidx, sord.ToLower() == "desc");
            }
            else
            {
                PackListFilter filter = JsonAppHelper.ToObject <PackListFilter>(filterStr);

                if (!string.IsNullOrEmpty(filter.F_EnCode))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_EnCode,
                        F_searchFiled = "F_EnCode",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_EnabledMark))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_EnabledMark,
                        F_searchFiled = "F_EnabledMark",
                        F_type        = "0"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_CustomerId))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_CustomerId,
                        F_searchFiled = "F_CustomerId",
                        F_type        = "0"
                    });
                }

                if (!string.IsNullOrEmpty(filter.F_Maker))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = filter.F_Maker,
                        F_searchFiled = "F_Maker",
                        F_type        = "2"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_SDate))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = Convert.ToDateTime(filter.F_SDate).ToString("yyyy-MM-dd"),
                        F_searchFiled = "F_Date",
                        F_type        = "5"
                    });
                }
                if (!string.IsNullOrEmpty(filter.F_EDate))
                {
                    advSearchList.Add(new AdvSearchEntity
                    {
                        F_condition   = "And",
                        F_fvalue      = Convert.ToDateTime(filter.F_EDate).AddDays(1).ToString("yyyy-MM-dd"),
                        F_searchFiled = "F_Date",
                        F_type        = "6"
                    });
                }
                lista = BLLFactory <PackList_Head> .Instance.FindWithPager(GetAdvCondition(advSearchList), pager, sidx, sord.ToLower().Equals("desc"));
            }
            var cuList = BLLFactory <Mst_Customer> .Instance.GetAll();

            foreach (var item in lista)
            {
                item.F_CustomerId = cuList.Find(u => u.F_Id == item.F_CustomerId) != null?cuList.Find(u => u.F_Id == item.F_CustomerId).F_FullName : "";
            }
            return(GetPagerContent <PackList_HeadInfo>(lista, pager));
        }