Esempio n. 1
0
        /// <summary>
        /// 获取单个商品类别信息
        /// </summary>
        /// <param name="Item_Category_Id"></param>
        /// <returns></returns>
        public ItemCategoryInfo GetItemCategoryById(string Item_Category_Id)
        {
            try
            {
                DataSet ds = new DataSet();
                ds = itemCategoryService.GetItemCategoryById(Item_Category_Id);
                ItemCategoryInfo itemCategoryInfo = new ItemCategoryInfo();
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    itemCategoryInfo = DataTableToObject.ConvertToObject <ItemCategoryInfo>(ds.Tables[0].Rows[0]);

                    var objectImagesBLL = new ObjectImagesBLL(loggingSessionInfo);


                    var tmpImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity()
                    {
                        ObjectId = Item_Category_Id
                    }, null);
                    if (tmpImageList != null && tmpImageList.Length > 0)
                    {
                        itemCategoryInfo.ImageUrl = tmpImageList[0].ImageURL;
                    }
                }

                return(itemCategoryInfo);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 获取某个应用系统下的所有角色
        /// </summary>
        /// <param name="loggingSession">当前登录用户的Session信息</param>
        /// <param name="appSysId">应用系统Id</param>
        /// <param name="maxRowCount">每页所占行数</param>
        /// <param name="startRowIndex">当前页的起始行数</param>
        /// <returns></returns>
        public RoleModel GetRolesByAppSysId(string appSysId, int maxRowCount, int startRowIndex, string type_id, string role_name, string UserID)
        {
            RoleModel roleInfo  = new RoleModel();
            Hashtable hashTable = new Hashtable();

            hashTable.Add("ApplicationId", appSysId);
            hashTable.Add("StartRow", startRowIndex);
            hashTable.Add("EndRow", startRowIndex + maxRowCount - 1);//结束页
            hashTable.Add("MaxRowCount", maxRowCount);
            hashTable.Add("CustomerId", loggingSessionInfo.CurrentLoggingManager.Customer_Id);
            hashTable.Add("UserID", UserID);//用户标识
            hashTable.Add("type_id", type_id ?? "");
            hashTable.Add("role_name", role_name ?? "");
            int iCount = appSysService.SearchRoleByAppSysIdCount(hashTable);//cSqlMapper.Instance().QueryForObject<int>("Role.SelectByApplicationIdCount", hashTable);
            IList <RoleModel> roleInfoList = new List <RoleModel>();
            DataSet           ds           = new DataSet();

            ds = appSysService.SearchRoleByAppSysIdList(hashTable);
            if (ds != null && ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                roleInfoList = DataTableToObject.ConvertToList <RoleModel>(ds.Tables[0]);
            }
            //roleInfoList = cSqlMapper.Instance().QueryForList<RoleModel>("Role.SelectByApplicationId", hashTable);
            roleInfo.ICount = iCount;

            //取模
            int mo = iCount % maxRowCount;

            roleInfo.TotalPage = iCount / maxRowCount + (mo == 0 ? 0 : 1);

            roleInfo.RoleInfoList = roleInfoList;
            return(roleInfo);
        }
Esempio n. 3
0
        /// <summary>
        /// 查询商品类别信息
        /// </summary>
        /// <param name="loggingSessionInfo">登录信息</param>
        /// <param name="item_category_code">号码</param>
        /// <param name="item_category_name">名称</param>
        /// <param name="pyzjm">拼音助记码</param>
        /// <param name="status">状态</param>
        /// <param name="maxRowCount">每页数量</param>
        /// <param name="startRowIndex">开始行号</param>
        /// <returns></returns>
        public ItemCategoryInfo SearchItemCategoryList(string item_category_code
                                                       , string item_category_name
                                                       , string pyzjm
                                                       , string status
                                                       , int maxRowCount
                                                       , int startRowIndex
                                                       , string item_category_id)
        {
            Hashtable _ht = new Hashtable();

            _ht.Add("item_category_code", item_category_code);
            _ht.Add("item_category_name", item_category_name);
            _ht.Add("pyzjm", pyzjm);
            _ht.Add("status", status);
            _ht.Add("StartRow", startRowIndex);
            _ht.Add("EndRow", startRowIndex + maxRowCount);
            _ht.Add("item_category_id", item_category_id);

            ItemCategoryInfo itemCategoryInfo = new ItemCategoryInfo();
            int iCount = itemCategoryService.SearchCount(_ht);

            IList <ItemCategoryInfo> itemCategoryInfoList = new List <ItemCategoryInfo>();
            DataSet ds = itemCategoryService.SearchInfoList(_ht);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                itemCategoryInfoList = DataTableToObject.ConvertToList <ItemCategoryInfo>(ds.Tables[0]);
            }

            itemCategoryInfo.ICount = iCount;
            itemCategoryInfo.ItemCategoryInfoList = itemCategoryInfoList;
            return(itemCategoryInfo);
        }
Esempio n. 4
0
        /// <summary>
        /// 订单查询(订单类)
        /// </summary>
        /// <param name="orderSearchInfo">参数集合</param>
        /// <returns></returns>
        public OrderInfo SearchOrderInfo(OrderSearchInfo orderSearchInfo)
        {
            try
            {
                OrderInfo orderInfo = new OrderInfo();
                if (orderSearchInfo.customer_id == null || orderSearchInfo.customer_id.Equals(""))
                {
                    orderSearchInfo.customer_id = loggingSessionInfo.CurrentLoggingManager.Customer_Id;
                }
                int iCount = orderService.SearchOrderCount(orderSearchInfo);

                IList <OrderInfo> orderInfoList = new List <OrderInfo>();
                DataSet           ds            = new DataSet();
                ds = orderService.SearchOrderInfo(orderSearchInfo);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    orderInfoList = DataTableToObject.ConvertToList <OrderInfo>(ds.Tables[0]);
                }
                orderInfo.ICount        = iCount;
                orderInfo.orderInfoList = orderInfoList;
                return(orderInfo);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Esempio n. 5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pParams"></param>
        /// <returns></returns>
        public List <StoreDetailViewEntity> GetStoreDetailByStoreID(Dictionary <string, string> pParams)
        {
            List <StoreDetailViewEntity>      storeList       = new List <StoreDetailViewEntity>();
            List <StoreItemDailyStatusEntity> storeStatusList = new List <StoreItemDailyStatusEntity>();
            DataSet ds = new DataSet();

            ds = itemService.GetStoreDetailByStoreID(pParams);
            if (ds != null &&
                ds.Tables.Count > 0 &&
                ds.Tables[0].Rows.Count > 0 &&       //两张表
                ds.Tables[1].Rows.Count > 0)
            {
                storeList       = DataTableToObject.ConvertToList <StoreDetailViewEntity>(ds.Tables[0]); //
                storeStatusList = DataTableToObject.ConvertToList <StoreItemDailyStatusEntity>(ds.Tables[1]);
            }
            else
            {
                return(null);
            }
            //构造门店房间房态价格
            DataTable dt = ConstuctIsFullDataTable(DateTime.Parse(pParams["pBeginDate"]), DateTime.Parse(pParams["pEndDate"]), ds.Tables[1]);

            for (int i = 0; i < storeList.Count; i++)
            {
                var info = dt.Select("skuid='" + storeList[i].SkuID + "' and IsFull=0").ToArray();
                if (dt.Select("skuid='" + storeList[i].SkuID + "' and IsFull=0").ToArray().Length > 0)
                {
                    storeList[i].IsFull = 0;
                }
            }

            return(storeList);
        }
Esempio n. 6
0
        /// <summary>
        /// 获取对应客户的全部订单状态
        /// </summary>
        /// <param name="paymentTypeId"></param>
        /// <returns></returns>
        public IList <string> GetAllOrderStatus(string paymentTypeId)
        {
            DataSet ds = _currentDAO.GetAllOrderStatus(paymentTypeId);
            IList <TInOutStatusNodeEntity> list = new List <TInOutStatusNodeEntity>();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                list = DataTableToObject.ConvertToList <TInOutStatusNodeEntity>(ds.Tables[0]);
            }

            //订单值集合
            IList <string> strList = new List <string>();

            foreach (TInOutStatusNodeEntity item in list)
            {
                if (!strList.Contains(item.NodeValue))
                {
                    strList.Add(item.NodeValue);
                }
                if (!strList.Contains(item.NextValue))
                {
                    strList.Add(item.NextValue);
                }
            }

            //排序
            strList = strList.OrderBy(i => i).ToList();

            return(strList);
        }
Esempio n. 7
0
        /// <summary>
        /// 活动明细 (活动启动)
        /// </summary>
        /// <param name="EventId"></param>
        /// <returns></returns>
        public MarketEventEntity GetMarketEventInfoById(string EventId)
        {
            MarketEventEntity eventInfo = new MarketEventEntity();
            DataSet           ds        = new DataSet();

            ds = _currentDAO.GetMarketEventInfoById(EventId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventInfo = DataTableToObject.ConvertToObject <MarketEventEntity>(ds.Tables[0].Rows[0]);
            }
            //获取活动模板信息
            ds = _currentDAO.GetMarketTemplateByEventID(EventId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventInfo.MarketTemplageInfo = DataTableToObject.ConvertToObject <MarketTemplateEntity>(ds.Tables[0].Rows[0]);
                //eventInfo.TemplateContent = eventInfo.MarketTemplageInfo.TemplateContent;
            }
            //获取活动波段
            ds = _currentDAO.GetMarketWaveBandByEventID(EventId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventInfo.MarketWaveBandInfoList = DataTableToObject.ConvertToList <MarketWaveBandEntity>(ds.Tables[0]);
            }
            //获取活动门店

            //获取活动人群
            return(eventInfo);
        }
Esempio n. 8
0
        /// <summary>
        /// 获取近期关注的会员
        /// </summary>
        /// <param name="Weixin"></param>
        /// <param name="TimeLength"></param>
        /// <returns></returns>
        public IList <VipShowLogEntity> GetRecentfollowers(string Weixin, string TimeLength)
        {
            IList <VipShowLogEntity> vipShowLogInfoList = new List <VipShowLogEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetRecentfollowers(Weixin, TimeLength);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                vipShowLogInfoList = DataTableToObject.ConvertToList <VipShowLogEntity>(ds.Tables[0]);
                if (vipShowLogInfoList != null && vipShowLogInfoList.Count > 0)
                {
                    VipBLL vipService = new VipBLL(this.CurrentUserInfo);
                    foreach (var info in vipShowLogInfoList)
                    {
                        if (info.VipCode == null || info.VipCode.Equals(""))
                        {
                            VipEntity vipInfo = new VipEntity();
                            vipInfo.VipCode = vipService.GetVipCode();
                            info.VipCode    = vipInfo.VipCode;
                            vipInfo.VIPID   = info.VIPID;
                            vipService.Update(vipInfo, false);
                        }
                    }
                }
            }
            return(vipShowLogInfoList);
        }
Esempio n. 9
0
        /// <summary>
        /// 获取商品明细
        /// </summary>
        /// <param name="loggingSessionInfo">登录model</param>
        /// <param name="order_id">订单标识</param>
        /// <param name="unit_id">组织标识</param>
        /// <param name="warehouse_id">门店标识</param>
        /// <param name="maxRowCount">最大数量</param>
        /// <param name="startRowIndex">开始数量</param>
        /// <returns>ccDetailInfo.icount = 总数量 ccDetailInfo.CCDetailInfoList = 商品明细集合</returns>
        public CCDetailInfo GetCCDetailListStockBalance(LoggingSessionInfo loggingSessionInfo, string order_id, string unit_id, string warehouse_id, int maxRowCount, int startRowIndex)
        {
            try
            {
                CCDetailInfo ccDetailInfo = new CCDetailInfo();

                Hashtable _ht = new Hashtable();
                _ht.Add("OrderId", order_id);
                _ht.Add("UnitId", unit_id);
                _ht.Add("WarehouseId", warehouse_id);
                _ht.Add("StartRow", startRowIndex);
                _ht.Add("EndRow", startRowIndex + maxRowCount);

                int iCount = ccService.GetStockBalanceCount(_ht);
                if (iCount > 0)
                {
                    IList <CCDetailInfo> ccDetailList = new List <CCDetailInfo>();
                    DataSet ds = new DataSet();
                    ds = ccService.GetStockBanlanceList(_ht);
                    if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                    {
                        ccDetailList = DataTableToObject.ConvertToList <CCDetailInfo>(ds.Tables[0]);
                    }
                    ccDetailInfo.icount           = iCount;
                    ccDetailInfo.CCDetailInfoList = ccDetailList;
                }
                return(ccDetailInfo);
            }
            catch (Exception ex) {
                throw (ex);
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <UserInfo> GetHairStylistByStoreId(string customerId, string unitId, int Page, int PageSize)
        {
            var lNewsBLL        = new LNewsBLL(CurrentUserInfo);
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);
            var itemService     = new ItemService(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <UserInfo> eventsList = new List <UserInfo>();
            DataSet          ds         = new DataSet();

            ds = _currentDAO.GetHairStylistByStoreId(customerId, unitId, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <UserInfo>(ds.Tables[0]);

                //if (eventsList != null)
                //{
                //    foreach (var item in eventsList)
                //    {
                //        item.ImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity()
                //        {
                //            ObjectId = item.VipShowId
                //        }, null);
                //    }
                //}
            }
            return(eventsList);
        }
Esempio n. 11
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <ZCourseReflectionsEntity> GetList(ZCourseReflectionsEntity entity, int Page, int PageSize)
        {
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <ZCourseReflectionsEntity> eventsList = new List <ZCourseReflectionsEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetList(entity, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <ZCourseReflectionsEntity>(ds.Tables[0]);

                foreach (var item in eventsList)
                {
                    item.ImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity()
                    {
                        ObjectId = item.ReflectionsId
                    }, null).ToList();
                    if (item.ImageList.Count > 0)
                    {
                        item.ImageURL = item.ImageList[0].ImageURL;
                    }
                }
            }
            return(eventsList);
        }
Esempio n. 12
0
        /// <summary>
        /// 插入一个终端
        /// </summary>
        /// <param name="loggingSession">当前用户的登录信息</param>
        /// <param name="pos">终端信息</param>
        /// <returns></returns>
        public bool InsertPos(PosInfo pos)
        {
            if (string.IsNullOrEmpty(pos.ID))
            {
                pos.ID = this.NewGuid();
            }
            pos.CreateUserID   = loggingSessionInfo.CurrentUser.User_Id;
            pos.CreateUserName = loggingSessionInfo.CurrentUser.User_Name;

            bool bReturn = posService.InsertPos(pos);

            if (bReturn)
            {
                DataSet ds = new DataSet();
                ds = posService.GetPosInfoById(pos.ID);

                if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
                {
                    pos = DataTableToObject.ConvertToObject <PosInfo>(ds.Tables[0].Rows[0]);
                    //交至管理平台
                    this.synPosToAP(this.loggingSessionInfo.CurrentLoggingManager.Customer_Id, 1, pos);
                }
            }

            return(true);
        }
        public StoreBrandMappingEntity GetStoreListByItem(string ItemId
                                                          , int Page
                                                          , int PageSize
                                                          , string Longitude
                                                          , string Latitude
                                                          , out string strError)
        {
            StoreBrandMappingEntity storeInfo = new StoreBrandMappingEntity();

            try
            {
                storeInfo.TotalCount = _currentDAO.GetStoreListByItemCount(ItemId, Page, PageSize, Longitude, Latitude);
                IList <StoreBrandMappingEntity> list = new List <StoreBrandMappingEntity>();
                DataSet ds = new DataSet();
                ds = _currentDAO.GetStoreListByItem(ItemId, Page, PageSize, Longitude, Latitude);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    list = DataTableToObject.ConvertToList <StoreBrandMappingEntity>(ds.Tables[0]);
                }
                strError = "ok";
                storeInfo.StoreBrandList = list;
            }
            catch (Exception ex) {
                strError = ex.ToString();
            }
            return(storeInfo);
        }
Esempio n. 14
0
        /// <summary>
        /// 获取某种表单类型的所有状态
        /// </summary>
        /// <param name="loggingSession">当前登录的信息</param>
        /// <param name="billKindID">表单类型ID</param>
        /// <returns></returns>
        public IList <BillStatusModel> GetAllBillStatusesByBillKindID(string billKindID)
        {
            IList <BillStatusModel> billStatusInfoList = new List <BillStatusModel>();

            if (this.loggingSessionInfo.CurrentLoggingManager.IsApprove == null || this.loggingSessionInfo.CurrentLoggingManager.IsApprove.Equals(""))
            {
                BillStatusModel billStatusInfo = new BillStatusModel();
                billStatusInfo.Status      = "-1";
                billStatusInfo.Description = "删除";
                billStatusInfoList.Add(billStatusInfo);
                BillStatusModel billStatusInfo1 = new BillStatusModel();
                billStatusInfo1.Status      = "1";
                billStatusInfo1.Description = "未审批";
                billStatusInfoList.Add(billStatusInfo1);
                BillStatusModel billStatusInfo2 = new BillStatusModel();
                billStatusInfo2.Status      = "10";
                billStatusInfo2.Description = "已审批";
                billStatusInfoList.Add(billStatusInfo2);
            }
            else
            {
                DataSet ds = billService.GetAllBillStatusesByBillKindID(billKindID);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    billStatusInfoList = DataTableToObject.ConvertToList <BillStatusModel>(ds.Tables[0]);
                }
            }

            return(billStatusInfoList);
        }
Esempio n. 15
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <MVipShowEntity> GetList(MVipShowEntity entity, int Page, int PageSize)
        {
            var lNewsBLL        = new LNewsBLL(CurrentUserInfo);
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);
            var itemService     = new ItemService(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <MVipShowEntity> eventsList = new List <MVipShowEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetList(entity, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <MVipShowEntity>(ds.Tables[0]);

                if (eventsList != null)
                {
                    foreach (var item in eventsList)
                    {
                        item.ImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity()
                        {
                            ObjectId = item.VipShowId
                        }, new OrderBy[] { new  OrderBy {
                                               FieldName = "CreateTime", Direction = OrderByDirections.Desc
                                           } });
                    }
                }
            }
            return(eventsList);
        }
Esempio n. 16
0
        public CouponBindLogPagedSearchRD BindCouponLog(CouponBindLogPagedSearchRP couponBindLogPagedSearchRP)
        {
            CouponBindLogPagedSearchRD couponBindLogPagedSearchRD = new CouponBindLogPagedSearchRD();

            DataSet dataSet = this._currentDAO.BindCouponLog(couponBindLogPagedSearchRP.CouponTypeID, couponBindLogPagedSearchRP.CouponName, couponBindLogPagedSearchRP.CouponCode, couponBindLogPagedSearchRP.VipCriteria, couponBindLogPagedSearchRP.BindingBeginTime, couponBindLogPagedSearchRP.BindingEndTime, couponBindLogPagedSearchRP.Operator, couponBindLogPagedSearchRP.PageIndex, couponBindLogPagedSearchRP.PageSize);

            if (Utils.IsDataSetValid(dataSet))
            {
                var list = DataTableToObject.ConvertToList <BindCouponEntity>(dataSet.Tables[0]);
                couponBindLogPagedSearchRD.CouponList = list.ToArray();

                couponBindLogPagedSearchRD.TotalPage  = int.Parse(dataSet.Tables[1].Rows[0][0].ToString());
                couponBindLogPagedSearchRD.TotalCount = int.Parse(dataSet.Tables[1].Rows[0][1].ToString());
            }

            if (couponBindLogPagedSearchRD.CouponList != null)
            {
                foreach (BindCouponEntity item in couponBindLogPagedSearchRD.CouponList)
                {
                    item.CreateTime = item.CreateTime != "" ? Convert.ToDateTime(item.CreateTime).ToLongDateString().ToString() : "";
                }
            }

            return(couponBindLogPagedSearchRD);
        }
Esempio n. 17
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <ItemKeepEntity> GetList(ItemKeepEntity entity, int Page, int PageSize)
        {
            var lNewsBLL        = new LNewsBLL(CurrentUserInfo);
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);
            var itemService     = new ItemService(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <ItemKeepEntity> eventsList = new List <ItemKeepEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetList(entity, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <ItemKeepEntity>(ds.Tables[0]);

                if (eventsList != null)
                {
                    foreach (var item in eventsList)
                    {
                        item.ItemDetail = itemService.GetVwItemDetailById(item.ItemId, entity.VipId);
                    }
                }
            }
            return(eventsList);
        }
Esempio n. 18
0
        /// <summary>
        /// 获取满足查询条件的终端的某页上的所有终端
        /// </summary>
        /// <param name="condition">HoldType:终端持有方式;Type:终端类型;Code:终端编码;SN:终端序列号;PurchaseDateBegin:起始购买日期;PurchaseDateEnd:终止购买日期;InsuranceDateBegin:起始出保日期;InsuranceDateEnd:起始出保日期;</param>
        /// <param name="maxRowCount">每页所占行数</param>
        /// <param name="startRowIndex">当前页的起始行数</param>
        /// <returns>满足条件的终端的列表</returns>
        public IList <PosInfo> SelectPosList(string HoldType
                                             , string Type
                                             , string Code
                                             , string SN
                                             , string PurchaseDateBegin
                                             , string PurchaseDateEnd
                                             , string InsuranceDateBegin
                                             , string InsuranceDateEnd, int maxRowCount, int startRowIndex)
        {
            IList <PosInfo> posInfoList = new List <PosInfo>();
            DataSet         ds          = new DataSet();

            ds = posService.SelectPosList(HoldType
                                          , Type
                                          , Code
                                          , SN
                                          , PurchaseDateBegin
                                          , PurchaseDateEnd
                                          , InsuranceDateBegin
                                          , InsuranceDateEnd
                                          , startRowIndex
                                          , startRowIndex + maxRowCount);
            if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
            {
                posInfoList = DataTableToObject.ConvertToList <PosInfo>(ds.Tables[0]);
            }
            return(posInfoList);
        }
        public IList <StoreItemDailyStatusEntity> GetList(string beginDate, string endDate, string storeID, string skuID, int pageIndex, int pageSize, out int totalCount)
        {
            DataSet ds = _currentDAO.GetList(beginDate, endDate, storeID, skuID,
                                             pageIndex, pageSize, out totalCount);

            return(DataTableToObject.ConvertToList <StoreItemDailyStatusEntity>(ds.Tables[0]));
        }
Esempio n. 20
0
        /// <summary>
        /// 查询商品
        /// </summary>
        /// <param name="loggingSessionInfo">登录model</param>
        /// <param name="item_code">商品号码</param>
        /// <param name="item_name">商品名称</param>
        /// <param name="item_category_id">类型标识</param>
        /// <param name="status">状态</param>
        /// <param name="item_can_redeem">是否积分商品</param>
        /// <param name="maxRowCount">当前页数量</param>
        /// <param name="startRowIndex">开始数量</param>
        /// <returns></returns>
        public ItemInfo SearchItemList(string item_code
                                       , string item_name
                                       , string item_category_id
                                       , string status
                                       , string item_can_redeem
                                       , int maxRowCount
                                       , int startRowIndex)
        {
            Hashtable _ht = new Hashtable();

            if (item_code == null)
            {
                item_code = "";
            }
            if (item_name == null)
            {
                item_name = "";
            }
            if (item_category_id == null)
            {
                item_category_id = "";
            }
            if (status == null)
            {
                status = "";
            }
            if (item_can_redeem == null)
            {
                item_can_redeem = "";
            }
            //if (maxRowCount == null) maxRowCount = 0;
            //if (startRowIndex == null) startRowIndex = 0;

            _ht.Add("item_code", item_code);
            _ht.Add("item_name", item_name);
            _ht.Add("item_category_id", item_category_id);
            _ht.Add("status", status);
            _ht.Add("item_can_redeem", item_can_redeem);

            _ht.Add("StartRow", startRowIndex);
            _ht.Add("EndRow", startRowIndex + maxRowCount);

            ItemInfo itemInfo = new ItemInfo();
            int      iCount   = itemService.SearchCount(_ht);

            IList <ItemInfo> ItemInfoList = new List <ItemInfo>();
            DataSet          ds           = new DataSet();

            ds = itemService.SearchList(_ht);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                ItemInfoList = DataTableToObject.ConvertToList <ItemInfo>(ds.Tables[0]);
            }

            itemInfo.ICount       = iCount;
            itemInfo.ItemInfoList = ItemInfoList;
            return(itemInfo);
        }
Esempio n. 21
0
        /// <summary>
        /// 新建一个Bill
        /// </summary>
        /// <param name="loggingSession">当前登录用户的Session信息</param>
        /// <param name="bill">Bill</param>
        /// <returns>操作的状态</returns>
        public BillOperateStateService InsertBill(BillModel bill)
        {
            //获取表单类别
            BillKindModel billKind = GetBillKindById(bill.KindId);

            if (billKind == null)
            {
                return(BillOperateStateService.NotExistKind);
            }
            //获取表单状态
            BillStatusModel beginBillStatus = GetBillBeginStatus(bill.KindId);

            if (beginBillStatus == null)
            {
                return(BillOperateStateService.NotSetBeginStatus);
            }
            BillActionModel billCreateAction = GetBillAction(bill.KindId, BillActionType.Create);

            if (billCreateAction == null)
            {
                return(BillOperateStateService.NotSetCreateAction);
            }
            //获取角色与操作集合
            BillActionRoleModel billCreateActionRole = new BillActionRoleModel();
            DataSet             ds = new DataSet();

            ds = billService.GetbillCreateActionRole(bill.KindId, billCreateAction.Id, GetBasicRoleId(this.loggingSessionInfo.CurrentUserRole.RoleId), beginBillStatus.Status);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                billCreateActionRole = DataTableToObject.ConvertToObject <BillActionRoleModel>(ds.Tables[0].Rows[0]);
            }
            if (billCreateActionRole == null)
            {
                return(BillOperateStateService.NotAllowCreate);
            }

            //if (billKind.MoneyFlag == 1)
            //{
            //    if ((bill.Money < billCreateActionRole.MinMoney) || (bill.Money > billCreateActionRole.MaxMoney))
            //    {
            //        return BillOperateStateService.OutOfMoneyScope;
            //    }
            //}

            bill.AddUserId = this.loggingSessionInfo.CurrentUser.User_Id;
            bill.AddDate   = GetCurrentDateTime();
            bill.Status    = billCreateActionRole.CurrentStatus;
            //插入bill信息
            billService.InsertBill(bill);

            //InsertBillActionLog(loggingSession, bill, billCreateAction, billCreateActionRole, null);

            return(BillOperateStateService.CreateSuccessful);
        }
Esempio n. 22
0
        /// <summary>
        /// 获取某种表单的删除状态
        /// </summary>
        /// <param name="loggingSession">语言</param>
        /// <param name="billKindId">Bill的种类</param>
        /// <returns></returns>
        private BillStatusModel GetBillDeleteStatus(string billKindId)
        {
            BillStatusModel billStatusInfo = new BillStatusModel();
            DataSet         ds             = new DataSet();

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                billStatusInfo = DataTableToObject.ConvertToObject <BillStatusModel>(ds.Tables[0].Rows[0]);
            }
            return(billStatusInfo);
        }
Esempio n. 23
0
        /// <summary>
        /// 获取某种Bill的某种状态
        /// </summary>
        /// <param name="loggingSession">当前登录用户的Session信息</param>
        /// <param name="billKindId">Bill的种类</param>
        /// <param name="billStatus">Bill的某种状态</param>
        /// <returns></returns>
        public BillStatusModel GetBillStatusByKindIdAndStatus(string billKindId, string billStatus)
        {
            BillStatusModel billStatusInfo = new BillStatusModel();
            DataSet         ds             = billService.GetBillStatusByKindIdAndStatus(billKindId, billStatus);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                billStatusInfo = DataTableToObject.ConvertToObject <BillStatusModel>(ds.Tables[0].Rows[0]);
            }
            return(billStatusInfo);
        }
Esempio n. 24
0
        /// <summary>
        /// 获取商品信息
        /// </summary>
        public VwItemDetailEntity GetVwItemDetailById(string itemId, string vipId)
        {
            VwItemDetailEntity itemDetailObj = null;
            var ds = itemService.GetVwItemDetailById(itemId, vipId);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                itemDetailObj = DataTableToObject.ConvertToObject <VwItemDetailEntity>(ds.Tables[0].Rows[0]);
            }
            return(itemDetailObj);
        }
Esempio n. 25
0
        public KJItemSkuInfo GetKJItemSkuInfo(string eventId, string skuId, string KJEventJoinId)
        {
            KJItemSkuInfo KJItemSkuInfo = new KJItemSkuInfo();
            DataSet       ds            = this._currentDAO.GetKJItemSkuInfo(eventId, skuId, KJEventJoinId);

            if (ds.Tables[0].Rows.Count > 0)
            {
                KJItemSkuInfo = DataTableToObject.ConvertToObject <KJItemSkuInfo>(ds.Tables[0].Rows[0]);
            }
            return(KJItemSkuInfo);
        }
Esempio n. 26
0
        /// <summary>
        /// 根据Bill的Id查询Bill
        /// </summary>
        /// <param name="loggingSession">当前登录用户的Session信息</param>
        /// <param name="billId">Bill的Id</param>
        /// <returns></returns>
        public BillModel GetBillById(string billId)
        {
            BillModel billInfo = new BillModel();
            DataSet   ds       = billService.GetBillById(billId);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                billInfo = DataTableToObject.ConvertToObject <BillModel>(ds.Tables[0].Rows[0]);
            }
            return(billInfo);
        }
Esempio n. 27
0
        public KJEventItemDetailInfo GetKJEventWithSkuDetail(string eventId, string SkuId)
        {
            KJEventItemDetailInfo eventItemDetail = null;
            DataSet ds = this._currentDAO.GetKJEventWithSkuDetail(eventId, SkuId);

            if (ds.Tables[0].Rows.Count > 0)
            {
                eventItemDetail = DataTableToObject.ConvertToObject <KJEventItemDetailInfo>(ds.Tables[0].Rows[0]);
            }
            return(eventItemDetail);
        }
Esempio n. 28
0
        public List <KJEventItemInfo> GetKJEventWithItemList(string customerId)
        {
            List <KJEventItemInfo> eventItemList = new List <KJEventItemInfo>();
            DataSet ds = this._currentDAO.GetKJEventWithItemList(customerId);

            if (ds.Tables[0].Rows.Count > 0)
            {
                eventItemList = DataTableToObject.ConvertToList <KJEventItemInfo>(ds.Tables[0]);
            }
            return(eventItemList);
        }
Esempio n. 29
0
        /// <summary>
        /// 根据楼盘详细ID获取该楼盘详细信息。
        /// </summary>
        /// <param name="customerID"></param>
        /// <param name="houseDetaliID"></param>
        /// <returns></returns>
        public WXHouseDetailEntity GetDetailByID(string customerID, string detailID)
        {
            DataSet             ds     = this._currentDAO.GetDetails(customerID, detailID);
            WXHouseDetailEntity entity = null;

            if (ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
            {
                entity = DataTableToObject.ConvertToObject <WXHouseDetailEntity>(ds.Tables[0].Rows[0]);
            }
            return(entity);
        }
Esempio n. 30
0
        /// <summary>
        /// 获取抽奖机会
        /// </summary>
        /// <param name="customerId">客户标识</param>
        /// <param name="vipId"></param>
        /// <returns></returns>
        public IList <MVipShowEntity> GetLotteryCount(string customerId, string vipId)
        {
            IList <MVipShowEntity> list = new List <MVipShowEntity>();
            DataSet ds = _currentDAO.GetLotteryCount(customerId, vipId);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                list = DataTableToObject.ConvertToList <MVipShowEntity>(ds.Tables[0]);
            }
            return(list);
        }