コード例 #1
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);
        }
コード例 #2
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);
            }
        }
コード例 #3
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);
        }
コード例 #4
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);
        }
コード例 #5
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);
        }
コード例 #6
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);
        }
コード例 #7
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);
        }
コード例 #8
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);
        }
コード例 #9
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);
        }
コード例 #10
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);
        }
コード例 #11
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);
        }
コード例 #12
0
        /// <summary>
        /// 根据角色Id获取角色
        /// </summary>
        /// <param name="loggingSession">当前登录用户的Session信息</param>
        /// <param name="roleId">角色Id</param>
        /// <returns></returns>
        public RoleModel GetRoleById(LoggingSessionInfo loggingSession, string roleId)
        {
            RoleModel roleInfo = new RoleModel();
            DataTable dt       = appSysService.GetRoleById(roleId);

            if (dt != null && dt.Rows.Count > 0)
            {
                roleInfo = DataTableToObject.ConvertToObject <RoleModel>(dt.Rows[0]);
            }
            return(roleInfo);
        }
コード例 #13
0
        /// <summary>
        /// 根据商品获取Sku
        /// </summary>
        /// <param name="itemId">商品标识</param>
        /// <returns></returns>
        public T_ItemSkuPropInfo GetItemSkuPropByItemId(string itemId)
        {
            T_ItemSkuPropInfo skuInfoList = new T_ItemSkuPropInfo();
            DataSet           ds          = new DataSet();

            ds = _currentDAO.GetItemSkuPropByItemId(itemId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                skuInfoList = DataTableToObject.ConvertToObject <T_ItemSkuPropInfo>(ds.Tables[0].Rows[0]);
            }
            return(skuInfoList);
        }
コード例 #14
0
        /// <summary>
        /// 获取房产详细url地址。
        /// </summary>
        /// <param name="customerId">客户ID。</param>
        /// <param name="objectID">房产ID。</param>
        /// <returns>房产详细页面相关信息。</returns>
        public ObjectImagesEntity GetObjectImagesByCustomerId(string customerId, string objectID)
        {
            ObjectImagesEntity entity = new ObjectImagesEntity();
            DataSet            ds     = new DataSet();

            ds = _currentDAO.GetObjectImagesByCustomerId(customerId, objectID);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                entity = DataTableToObject.ConvertToObject <ObjectImagesEntity>(ds.Tables[0].Rows[0]);
            }
            return(entity);
        }
コード例 #15
0
ファイル: CityService.cs プロジェクト: radtek/CustomerManage
        /// <summary>
        /// 获取单个城市信息
        /// </summary>
        /// <param name="loggingSessionInfo"></param>
        /// <param name="city_id"></param>
        /// <returns></returns>
        public CityInfo GetCityById(string city_id)
        {
            CityInfo cityInfo = new CityInfo();
            DataSet  ds       = new DataSet();

            ds = cityService.GetCityById(city_id);
            if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
            {
                cityInfo = DataTableToObject.ConvertToObject <CityInfo>(ds.Tables[0].Rows[0]);
            }
            return(cityInfo);
        }
コード例 #16
0
ファイル: RoleService.cs プロジェクト: radtek/CustomerManage
        /// <summary>
        /// 获取客户的默认角色
        /// </summary>
        /// <param name="loggingManager"></param>
        /// <param name="customer_id"></param>
        /// <returns></returns>
        public RoleModel GetRoleDefaultByCustomerId(string customer_id)
        {
            RoleModel roleInfo = new RoleModel();
            DataSet   ds       = new DataSet();

            ds = roleService.GetRoleDefaultByCustomerId(customer_id);
            if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
            {
                roleInfo = DataTableToObject.ConvertToObject <RoleModel>(ds.Tables[0].Rows[0]);
            }
            return(roleInfo);
        }
コード例 #17
0
        /// <summary>
        /// 根据仓库ID,获取仓库信息
        /// </summary>
        /// <param name="loggingSession">当前用户的登录信息</param>
        /// <param name="warehouseID">仓库ID</param>
        /// <returns></returns>
        public WarehouseInfo GetWarehouseByID(LoggingSessionInfo loggingSession, string warehouseID)
        {
            WarehouseInfo warehouseInfo = new WarehouseInfo();
            DataSet       ds            = new DataSet();

            ds = posService.GetWarehouseByID(warehouseID);
            if (ds != null && ds.Tables != null && ds.Tables[0].Rows.Count > 0)
            {
                warehouseInfo = DataTableToObject.ConvertToObject <WarehouseInfo>(ds.Tables[0].Rows[0]);
            }
            return(warehouseInfo);
        }
コード例 #18
0
ファイル: SkuService.cs プロジェクト: radtek/CustomerManage
        /// <summary>
        /// 根据sku标识获取sku明细
        /// </summary>
        /// <param name="skuId">sku标识</param>
        /// <returns></returns>
        public SkuInfo GetSkuInfoById(string skuId)
        {
            SkuInfo skuInfo = new SkuInfo();
            DataSet ds      = new DataSet();

            ds = skuService.GetSkuInfoById(skuId);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                skuInfo = DataTableToObject.ConvertToObject <SkuInfo>(ds.Tables[0].Rows[0]);
            }
            return(skuInfo);
        }
コード例 #19
0
ファイル: RoleService.cs プロジェクト: radtek/CustomerManage
        /// <summary>
        /// 通过角色Code获取角色
        /// </summary>
        public RoleModel GetRoleByRoleCode(string customerId, string roleCode)
        {
            RoleModel roleInfo = new RoleModel();
            DataSet   ds       = new DataSet();

            ds = roleService.GetRoleByRoleCode(customerId, roleCode);
            if (ds != null && ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                roleInfo = DataTableToObject.ConvertToObject <RoleModel>(ds.Tables[0].Rows[0]);
            }
            return(roleInfo);
        }
コード例 #20
0
        public PanicbuyingEventItemMappingEntity GetPanicbuyingEventEntity(string eventId, string sku_id)
        {
            var ds = this._currentDAO.GetPanicbuyingEventEntity(eventId, sku_id);
            PanicbuyingEventItemMappingEntity panicbuyingEventItemMappingEntity = null;

            if (ds.Tables.Count >= 0 && ds.Tables[0].Rows.Count >= 0)
            {
                panicbuyingEventItemMappingEntity = DataTableToObject.ConvertToObject <PanicbuyingEventItemMappingEntity>(ds.Tables[0].Rows[0]);
            }

            return(panicbuyingEventItemMappingEntity);
        }
コード例 #21
0
        /// <summary>
        /// 根据custoerID和总金额取得运费
        /// </summary>
        /// <param name="OrderId"></param>
        /// <returns></returns>
        public JIT.CPOS.BS.Entity.CustomerDeliveryStrategyEntity GetDeliveryAmount(string CustomerId, decimal total_amount, string DeliveryId)
        {
            JIT.CPOS.BS.Entity.CustomerDeliveryStrategyEntity orderInfo = new JIT.CPOS.BS.Entity.CustomerDeliveryStrategyEntity();
            DataSet ds = new DataSet();

            ds = this._currentDAO.GetDeliveryAmount(CustomerId, total_amount, DeliveryId);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                orderInfo = DataTableToObject.ConvertToObject <JIT.CPOS.BS.Entity.CustomerDeliveryStrategyEntity>(ds.Tables[0].Rows[0]);
            }
            return(orderInfo);
        }
コード例 #22
0
        /// <summary>
        /// 根据终端ID,获取终端信息
        /// </summary>
        /// <param name="loggingSession">当前用户的登录信息</param>
        /// <param name="posID">终端ID</param>
        /// <returns></returns>
        public PosInfo GetPosByID(LoggingSessionInfo loggingSession, string posID)
        {
            PosInfo pos = new PosInfo();
            DataSet ds  = new DataSet();

            ds = posService.GetPosInfoById(posID);

            if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
            {
                pos = DataTableToObject.ConvertToObject <PosInfo>(ds.Tables[0].Rows[0]);
            }
            return(pos);
        }
コード例 #23
0
        /// <summary>
        /// 获取电商订单详细信息
        /// </summary>
        /// <param name="OrderId"></param>
        /// <returns></returns>
        public JIT.CPOS.BS.Entity.Interface.SetOrderEntity GetOrderOnline(string OrderId)
        {
            JIT.CPOS.BS.Entity.Interface.SetOrderEntity orderInfo = new JIT.CPOS.BS.Entity.Interface.SetOrderEntity();
            DataSet ds = new DataSet();
            OnlineShoppingItemService onlineShoppingItemService = new OnlineShoppingItemService(loggingSessionInfo);

            ds = onlineShoppingItemService.GetOrderOnline(OrderId);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                orderInfo = DataTableToObject.ConvertToObject <JIT.CPOS.BS.Entity.Interface.SetOrderEntity>(ds.Tables[0].Rows[0]);
            }
            return(orderInfo);
        }
コード例 #24
0
        /// <summary>
        /// 根据微信的固定二维码获取活动信息
        /// </summary>
        /// <param name="wxCode"></param>
        /// <returns></returns>
        public LEventsEntity GetEventInfoByWX(string wxCode)
        {
            DataSet               ds   = new DataSet();
            LEventsEntity         info = new LEventsEntity();
            IList <LEventsEntity> list = new List <LEventsEntity>();

            ds = _currentDAO.GetEventInfoByWX(wxCode);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                info = DataTableToObject.ConvertToObject <LEventsEntity>(ds.Tables[0].Rows[0]);
            }
            return(info);
        }
コード例 #25
0
        /// <summary>
        /// 根据商品价格类型标识获取商品价格类型信息
        /// </summary>
        /// <param name="loggingSessionInfo"></param>
        /// <param name="item_price_type_id"></param>
        /// <returns></returns>
        public ItemPriceTypeInfo GetItemPriceTypeById(string item_price_type_id)
        {
            Hashtable _ht = new Hashtable();

            _ht.Add("ItemPriceTypeId", item_price_type_id);
            ItemPriceTypeInfo itemPriceTypeInfo = new ItemPriceTypeInfo();
            DataSet           ds = new DataSet();

            ds = itemPriceTypeService.GetItemPriceTypeById(item_price_type_id);
            if (ds != null && ds.Tables != null && ds.Tables[0].Rows.Count > 0)
            {
                itemPriceTypeInfo = DataTableToObject.ConvertToObject <ItemPriceTypeInfo>(ds.Tables[0].Rows[0]);
            }
            return(itemPriceTypeInfo);
        }
コード例 #26
0
        ///<summary>
        ///获取[WMaterialWriting] By ModelId
        ///</summary>
        public WMaterialWritingEntity GetWMaterialWritingByModelId(string eventId)
        {
            WMaterialWritingEntity wMaterialWritingEntity = new WMaterialWritingEntity();

            DataSet ds = new DataSet();

            ds = this._currentDAO.GetWMaterialWritingByModelId(eventId);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                wMaterialWritingEntity = DataTableToObject.ConvertToObject <WMaterialWritingEntity>(ds.Tables[0].Rows[0]);
            }

            return(wMaterialWritingEntity);
        }
コード例 #27
0
        /// <summary>
        /// 摇奖
        /// </summary>
        /// <param name="UserName">用户名</param>
        /// <param name="UserID">用户标识</param>
        /// <param name="EventID">活动标识</param>
        /// <param name="Longitude"></param>
        /// <param name="Latitude"></param>
        /// <returns></returns>
        public GetResponseParams <ShakeOffLotteryResult> SetShakeOffLottery(string UserName, string UserID, string EventID, float Longitude, float Latitude)
        {
            #region 判断对象不能为空
            if (EventID == null || EventID.ToString().Equals(""))
            {
                return(new GetResponseParams <ShakeOffLotteryResult>
                {
                    Flag = "0",
                    Code = "419",
                    Description = "EventID不能为空",
                });
            }
            if (UserID == null || UserID.ToString().Equals(""))
            {
                return(new GetResponseParams <ShakeOffLotteryResult>
                {
                    Flag = "0",
                    Code = "405",
                    Description = "UserId不能为空",
                });
            }
            #endregion

            GetResponseParams <ShakeOffLotteryResult> response = new GetResponseParams <ShakeOffLotteryResult>();
            response.Flag        = "1";
            response.Code        = "200";
            response.Description = "成功";
            try
            {
                ShakeOffLotteryResult eventsInfo = new ShakeOffLotteryResult();
                DataSet ds = new DataSet();
                ds = _currentDAO.SetShakeOffLottery(UserName, UserID, EventID, Longitude, Latitude);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    eventsInfo = DataTableToObject.ConvertToObject <ShakeOffLotteryResult>(ds.Tables[0].Rows[0]);
                }

                response.Params = eventsInfo;
                return(response);
            }
            catch (Exception ex)
            {
                response.Flag = "0";
                response.Code = "103";
                //response.Description = "失败:" + ex.ToString();
                return(response);
            }
        }
コード例 #28
0
        /// <summary>
        /// 获取单个类型信息
        /// </summary>
        /// <param name="loggingSessionInfo"></param>
        /// <param name="type_id"></param>
        /// <returns></returns>
        public TypeInfo GetTypeInfoById(string type_id)
        {
            Hashtable _ht = new Hashtable();

            _ht.Add("Type_Id", type_id);
            //return (TypeInfo)cSqlMapper.Instance(loggingSessionInfo.CurrentLoggingManager).QueryForObject("Type.SelectById", _ht);
            TypeInfo typeInfo = new TypeInfo();
            DataSet  ds       = new DataSet();

            ds = typeService.GetTypeInfoById(type_id);
            if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
            {
                typeInfo = DataTableToObject.ConvertToObject <TypeInfo>(ds.Tables[0].Rows[0]);
            }
            return(typeInfo);
        }
コード例 #29
0
        /// <summary>
        /// 获取表单动作
        /// </summary>
        /// <param name="loggingSession">登录信息</param>
        /// <param name="billKindId">类型标识</param>
        /// <param name="billActionType">动作标识</param>
        /// <returns></returns>
        public BillActionModel GetBillAction(string billKindId, BillActionType billActionType)
        {
            BillActionModel billAction = null;
            string          conn       = "";

            switch (billActionType)
            {
            case BillActionType.Create:
                conn = " and a.create_flag=1 ";
                break;

            case BillActionType.Modify:
                conn = " and a.modify_flag=1 ";
                break;

            case BillActionType.Approve:
                conn = " and a.approve_flag=1 ";
                break;

            case BillActionType.Reject:
                conn = " and a.reject_flag=1 ";
                break;

            case BillActionType.Cancel:
                conn = " and a.cancel_flag=1 ";
                break;

            case BillActionType.Open:
                conn = " and 1=1 ";
                break;

            case BillActionType.Stop:
                conn = " and 1=1 ";
                break;

            default:
                conn = " and 1=1";
                return(null);
            }
            DataSet ds = billService.GetBillAction(billKindId, billActionType, conn);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                billAction = DataTableToObject.ConvertToObject <BillActionModel>(ds.Tables[0].Rows[0]);
            }
            return(billAction);
        }
コード例 #30
0
        public NewVersionEntity GetNewVersionEntity(string Plat, string Channel, string Version, string UserId)
        {
            NewVersionEntity newVersionInfo = new NewVersionEntity();

            try
            {
                #region 获取基本信息
                VersionManagerEntity versionInfo = new VersionManagerEntity();
                DataSet ds = new DataSet();
                ds = _currentDAO.GetVersionInfoByQuery(Plat, Channel, Version, UserId);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    versionInfo = DataTableToObject.ConvertToObject <VersionManagerEntity>(ds.Tables[0].Rows[0]);
                }
                if (versionInfo == null || versionInfo.Plat == null)
                {
                    newVersionInfo.Code                  = "200";
                    newVersionInfo.Description           = "没有新的下载信息";
                    newVersionInfo.message               = "没有新的下载信息";
                    newVersionInfo.isNewVersionAvailable = "0";
                    newVersionInfo.canSkip               = "1";
                    newVersionInfo.updateUrl             = "";
                    newVersionInfo.Version               = Version;
                }
                else
                {
                    newVersionInfo.Code                  = "220";
                    newVersionInfo.Description           = "有新版本";
                    newVersionInfo.message               = versionInfo.Notice;
                    newVersionInfo.isNewVersionAvailable = versionInfo.IsNewVersionAvailable;
                    newVersionInfo.canSkip               = versionInfo.CanSkip;
                    newVersionInfo.updateUrl             = versionInfo.DownloadURL;
                    newVersionInfo.Version               = versionInfo.VersionNoUpdate;
                }

                #endregion
                return(newVersionInfo);
            }
            catch (Exception ex)
            {
                newVersionInfo.Code        = "1003";
                newVersionInfo.Description = ex.ToString();
                newVersionInfo.canSkip     = "0";
                return(newVersionInfo);
            }
        }