public bool DelDAMachineRealTimeInfos(string[] Ids) { using (IDAMachineRealTimeInfoBLL DAMachineRealTimeInfoBLL = BLLContainer.Resolve <IDAMachineRealTimeInfoBLL>()) { try { List <DAMachineRealTimeInfo> entitys = new List <DAMachineRealTimeInfo>(); foreach (string id in Ids) { DAMachineRealTimeInfo item = DAMachineRealTimeInfoBLL.GetFirstOrDefault(id); entitys.Add(item); } return(DAMachineRealTimeInfoBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelFDIPostSaleOrderBatchs(string[] Ids) { using (IFDIPostSaleOrderBatchBLL FDIPostSaleOrderBatchBLL = BLLContainer.Resolve <IFDIPostSaleOrderBatchBLL>()) { try { List <FDIPostSaleOrderBatch> entitys = new List <FDIPostSaleOrderBatch>(); foreach (string id in Ids) { FDIPostSaleOrderBatch item = FDIPostSaleOrderBatchBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FDIPostSaleOrderBatchBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelSysRolePurviews(string[] Ids) { using (ISysRolePurviewBLL SysRolePurviewBLL = BLLContainer.Resolve <ISysRolePurviewBLL>()) { try { List <SysRolePurview> entitys = new List <SysRolePurview>(); foreach (string id in Ids) { SysRolePurview item = SysRolePurviewBLL.GetFirstOrDefault(id); entitys.Add(item); } return(SysRolePurviewBLL.Delete(entitys)); } catch { return(false); } } }
public object BindStoreOpenId(Dictionary <string, object> dicParas) { string errMsg = string.Empty; string storeId = dicParas.ContainsKey("storeId") ? dicParas["storeId"].ToString() : string.Empty; string openId = dicParas.ContainsKey("openId") ? dicParas["openId"].ToString() : string.Empty; string smsCode = dicParas.ContainsKey("smsCode") ? dicParas["smsCode"].ToString() : string.Empty; string mobile = dicParas.ContainsKey("mobile") ? dicParas["mobile"].ToString() : string.Empty; string key = mobile + "_" + smsCode; if (!FilterMobileBusiness.IsTestSMS) { if (!SMSCodeCache.IsExist(key)) { return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, "短信验证码无效")); } } //验证门店信息 //StoreCacheModel storeModel = null; //StoreBusiness store = new StoreBusiness(); //if (!store.IsEffectiveStore(storeId, ref storeModel, out errMsg)) //{ // return ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, errMsg); //} IStoreService storeService = BLLContainer.Resolve <IStoreService>(); var storeModel = storeService.GetModels(p => p.id.ToString().Equals(storeId)).FirstOrDefault <t_store>(); if (storeModel == null) { return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, "门店信息不存在")); } if (!string.IsNullOrEmpty(storeModel.openId)) { return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, "门店已绑定微信,不能重复绑定")); } if (!storeService.Update(storeModel)) { return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, "门店已绑定微信出错")); } return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.T, "")); }
public object GetPictures(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; IData_BillInfoService data_BillInfoService = BLLContainer.Resolve <IData_BillInfoService>(); string sql = "select * from Data_BillInfo"; var data_BillInfo = data_BillInfoService.SqlQuery(sql).ToList().GroupBy(p => p.PicturePath).Select(g => g.Key).ToList(); return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, data_BillInfo)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
public bool DelRmRepairRecords(string[] Ids) { using (IRmRepairRecordBLL RmRepairRecordBLL = BLLContainer.Resolve <IRmRepairRecordBLL>()) { try { List <RmRepairRecord> entitys = new List <RmRepairRecord>(); foreach (string id in Ids) { RmRepairRecord item = RmRepairRecordBLL.GetFirstOrDefault(id); entitys.Add(item); } return(RmRepairRecordBLL.Delete(entitys)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> public bool DelWmsAreaInfos(string[] Ids) { using (IWmsAreaInfoBLL WmsAreaInfoBLL = BLLContainer.Resolve <IWmsAreaInfoBLL>()) { try { List <WmsAreaInfo> entitys = new List <WmsAreaInfo>(); foreach (string id in Ids) { WmsAreaInfo item = WmsAreaInfoBLL.GetFirstOrDefault(id); entitys.Add(item); } return(WmsAreaInfoBLL.Delete(entitys)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> //[WebMethod(Description = "删除(多个)TmsToolsMaster")] public bool DelTmsToolsMasters(string[] Ids) { using (ITmsToolsMasterBLL TmsToolsMasterBLL = BLLContainer.Resolve <ITmsToolsMasterBLL>()) { try { List <TmsToolsMaster> entitys = new List <TmsToolsMaster>(); foreach (string id in Ids) { TmsToolsMaster item = TmsToolsMasterBLL.GetFirstOrDefault(id); entitys.Add(item); } return(TmsToolsMasterBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelQmsTests(string[] Ids) { using (IQmsTestBLL QmsTestBLL = BLLContainer.Resolve <IQmsTestBLL>()) { try { List <QmsTest> entitys = new List <QmsTest>(); foreach (string id in Ids) { QmsTest item = QmsTestBLL.GetFirstOrDefault(id); entitys.Add(item); } return(QmsTestBLL.Delete(entitys)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> public bool DelMesProductProcesss(string[] Ids) { using (IMesProductProcessBLL MesProductProcessBLL = BLLContainer.Resolve <IMesProductProcessBLL>()) { try { List <MesProductProcess> entitys = new List <MesProductProcess>(); foreach (string id in Ids) { MesProductProcess item = MesProductProcessBLL.GetFirstOrDefault(id); entitys.Add(item); } return(MesProductProcessBLL.Delete(entitys)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> public bool DelFmsActionFormulaDetails(string[] Ids) { using (IFmsActionFormulaDetailBLL FmsActionFormulaDetailBLL = BLLContainer.Resolve <IFmsActionFormulaDetailBLL>()) { try { List <FmsActionFormulaDetail> entitys = new List <FmsActionFormulaDetail>(); foreach (string id in Ids) { FmsActionFormulaDetail item = FmsActionFormulaDetailBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FmsActionFormulaDetailBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelPmTaskLines(string[] Ids) { using (IPmTaskLineBLL PmTaskLineBLL = BLLContainer.Resolve <IPmTaskLineBLL>()) { try { List <PmTaskLine> entitys = new List <PmTaskLine>(); foreach (string id in Ids) { PmTaskLine item = PmTaskLineBLL.GetFirstOrDefault(id); entitys.Add(item); } return(PmTaskLineBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelRsMaintainStandardss(string[] Ids) { using (IRsMaintainStandardsBLL RsMaintainStandardsBLL = BLLContainer.Resolve <IRsMaintainStandardsBLL>()) { try { List <RsMaintainStandards> entitys = new List <RsMaintainStandards>(); foreach (string id in Ids) { RsMaintainStandards item = RsMaintainStandardsBLL.GetFirstOrDefault(id); entitys.Add(item); } return(RsMaintainStandardsBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelFmsAssetTagSettings(string[] Ids) { using (IFmsAssetTagSettingBLL FmsAssetTagSettingBLL = BLLContainer.Resolve <IFmsAssetTagSettingBLL>()) { try { List <FmsAssetTagSetting> entitys = new List <FmsAssetTagSetting>(); foreach (string id in Ids) { FmsAssetTagSetting item = FmsAssetTagSettingBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FmsAssetTagSettingBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelFDIGetMaterialInfos(string[] Ids) { using (IFDIGetMaterialInfoBLL FDIGetMaterialInfoBLL = BLLContainer.Resolve <IFDIGetMaterialInfoBLL>()) { try { List <FDIGetMaterialInfo> entitys = new List <FDIGetMaterialInfo>(); foreach (string id in Ids) { FDIGetMaterialInfo item = FDIGetMaterialInfoBLL.GetFirstOrDefault(id); entitys.Add(item); } return(FDIGetMaterialInfoBLL.Delete(entitys)); } catch { return(false); } } }
public bool DelRsFactorys(string[] Ids) { using (IRsFactoryBLL RsFactoryBLL = BLLContainer.Resolve<IRsFactoryBLL>()) { try { List<RsFactory> entitys = new List<RsFactory>(); foreach (string id in Ids) { RsFactory item = RsFactoryBLL.GetFirstOrDefault(id); entitys.Add(item); } return RsFactoryBLL.Delete(entitys); } catch { return false; } } }
public bool DelAmAssetMasterNs(string[] Ids) { using (IAmAssetMasterNBLL AmAssetMasterNBLL = BLLContainer.Resolve <IAmAssetMasterNBLL>()) { try { List <AmAssetMasterN> entitys = new List <AmAssetMasterN>(); foreach (string id in Ids) { AmAssetMasterN item = AmAssetMasterNBLL.GetFirstOrDefault(id); entitys.Add(item); } return(AmAssetMasterNBLL.Delete(entitys)); } catch { return(false); } } }
/// <summary> /// 按照关键字段删除 /// </summary> /// <param name="Ids">关键字段数组</param> /// <returns>是否成功</returns> public bool DelDAStatusRecords(string[] Ids) { using (IDAStatusRecordBLL DAStatusRecordBLL = BLLContainer.Resolve <IDAStatusRecordBLL>()) { try { List <DAStatusRecord> entitys = new List <DAStatusRecord>(); foreach (string id in Ids) { DAStatusRecord item = DAStatusRecordBLL.GetFirstOrDefault(id); entitys.Add(item); } return(DAStatusRecordBLL.Delete(entitys)); } catch { return(false); } } }
public object GetGivebackRules(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; string storeId = dicParas.ContainsKey("storeId") ? dicParas["storeId"].ToString() : string.Empty; IData_GivebackRuleService data_GivebackRuleService = BLLContainer.Resolve <IData_GivebackRuleService>(); var data_GivebackRule = data_GivebackRuleService.GetModels(p => p.StoreID.Equals(storeId, StringComparison.OrdinalIgnoreCase)).ToList(); return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, data_GivebackRule)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
public object GetParam(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; string storeId = dicParas.ContainsKey("storeId") ? dicParas["storeId"].ToString() : string.Empty; string system = dicParas.ContainsKey("system") ? dicParas["system"].ToString() : string.Empty; //验证参数信息 if (!checkParams(dicParas, out errMsg)) { return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } if (string.IsNullOrEmpty(system)) { errMsg = "控件名称不能为空"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } IData_ParametersService data_ParameterService = BLLContainer.Resolve <IData_ParametersService>(); var data_Parameter = data_ParameterService.GetModels(p => p.StoreID.Equals(storeId, StringComparison.OrdinalIgnoreCase) && p.System.Equals(system, StringComparison.OrdinalIgnoreCase)).ToList(); var count = data_Parameter.Count; if (count == 0) { errMsg = "参数" + system + "数据库不存在"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } if (count > 1) { errMsg = "参数" + system + "数据库存在多个"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } var data_ParameterModel = data_Parameter.FirstOrDefault(); return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, data_ParameterModel)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
public object GetFoods(Dictionary <string, object> dicParas) { try { string MobileToken = dicParas.ContainsKey("mobileToken") ? dicParas["mobileToken"].ToString() : string.Empty;//获取手机令牌 string mobile = string.Empty; IMerchService merchService = BLLContainer.Resolve <IMerchService>("XCCloudRS232"); var merchlist = merchService.GetModels(x => x.Token == MobileToken && x.State == 1).FirstOrDefault <Base_MerchInfo>(); if (merchlist == null) { return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, "手机令牌无效")); } string FoodID = dicParas.ContainsKey("foodid") ? dicParas["foodid"].ToString() : string.Empty; //获取套餐ID string DeviceToken = dicParas.ContainsKey("deviceToken") ? dicParas["deviceToken"].ToString() : string.Empty; //获取设备token var devicelist = DeviceBusiness.GetDeviceModel(DeviceToken); if (devicelist == null) { return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, "设备令牌无效")); } string sql = "select * from ("; sql += "select a.FoodID,FoodName,a.FoodPrice,a.CoinQuantity,a.IsQuickFood,a.FoodState,a.DeviceID,b.*from (select * from t_foods) a, (select id,DeviceName from Base_DeviceInfo where Status='1') as b where a.DeviceID=b.ID "; sql += ")b"; sql += " where FoodState='1'and DeviceID='" + devicelist.ID + "' "; if (FoodID != "") { int ID = int.Parse(FoodID); sql += " and FoodID='" + ID + "' "; } sql += " order by ID "; DataSet ds1 = XCCloudRS232BLL.ExecuteQuerySentence(sql, null); DataTable dt1 = ds1.Tables[0]; if (dt1.Rows.Count > 0) { var StoreNamelist = Utils.GetModelList <FoodsModel>(dt1).ToList(); FoodsModellist foodsModellist = new FoodsModellist(); foodsModellist.Lists = StoreNamelist; return(ResponseModelFactory <FoodsModellist> .CreateModel(isSignKeyReturn, foodsModellist)); } return(ResponseModelFactory.CreateModel(isSignKeyReturn, Return_Code.T, "", Result_Code.F, "未查询到套餐信息")); } catch (Exception e) { throw e; } }
public object getStoreList(Dictionary <string, object> dicParas) { List <object> objList = new List <object>(); IStoreService storeService = BLLContainer.Resolve <IStoreService>(); string storeId = dicParas.ContainsKey("storeId") ? dicParas["storeId"].ToString() : string.Empty; string companyname = dicParas.ContainsKey("companyname") ? dicParas["companyname"].ToString() : string.Empty; string phone = dicParas.ContainsKey("phone") ? dicParas["phone"].ToString() : string.Empty; string sql = " select * from t_store where id like '%' + @storeId + '%' and companyname like '%' + @companyname + '%' and phone like '%' + @phone + '%' "; SqlParameter[] parameters = new SqlParameter[3]; parameters[0] = new SqlParameter("@storeId", storeId); parameters[1] = new SqlParameter("@companyname", companyname); parameters[2] = new SqlParameter("@phone", phone); var storeList = storeService.SqlQuery <t_store>(sql, parameters).ToList <t_store>(); for (int i = 0; i < storeList.Count; i++) { var store = storeList[i]; var obj = new { id = store.id, companyname = store.companyname, province = store.province, address = store.address, boss = store.boss, phone = store.phone, telphone = store.telphone, client_level = store.client_level, createtime = Convert.ToDateTime(store.createtime).ToString("yyyy-MM-dd HH:mm:ss"), updatetime = Convert.ToDateTime(store.updatetime).ToString("yyyy-MM-dd HH:mm:ss"), power_due_date = Convert.ToDateTime(store.power_due_date).ToString("yyyy-MM-dd"), note = store.note, parentid = store.parentid, developer = store.developer, store_password = store.store_password, store_dbname = store.store_dbname, wxfee = store.wxfee * 1000 }; objList.Add(obj); } return(ResponseModelFactory.CreateAnonymousSuccessModel(isSignKeyReturn, objList)); }
public ActionResult EditNotice(Flw_BiddingNotice flw_BiddingNotice) { var json = new JsonHelper() { Msg = "录入成功", Status = "n" }; try { #region 验证参数 if (string.IsNullOrWhiteSpace(flw_BiddingNotice.Title)) { json.Msg = "公告标题不能为空"; return(Json(json, JsonRequestBehavior.AllowGet)); } if (flw_BiddingNotice.NoticeType == 0) { json.Msg = "请选择公告类型"; return(Json(json, JsonRequestBehavior.AllowGet)); } #endregion int id = flw_BiddingNotice.ID; var bll = BLLContainer.Resolve <IFlw_BiddingNoticeService>(); var model = bll.GetModels(p => p.ID == id).FirstOrDefault(); model.PublishContent = Microsoft.JScript.GlobalObject.decodeURIComponent(flw_BiddingNotice.PublishContent); model.Publisher = ((UserInfoCacheModel)Session["loginUser"]).UserName; model.PublishCompany = ((UserInfoCacheModel)Session["loginUser"]).CompanyName; model.PublishTime = DateTime.Now; if (bll.Update(model)) { json.Status = "y"; } else { json.Msg = "更新数据库失败"; } } catch (Exception e) { json.Msg = e.Message; } return(Json(json, JsonRequestBehavior.AllowGet)); }
public object GetDigitCoin(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; XCCloudUserTokenModel userTokenKeyModel = (XCCloudUserTokenModel)dicParas[Constant.XCCloudUserTokenModel]; string storeId = (userTokenKeyModel.DataModel as UserDataModel).StoreID; IData_DigitCoinService data_DigitCoinService = BLLContainer.Resolve <IData_DigitCoinService>(); var data_DigitCoin = data_DigitCoinService.GetModels(p => p.StoreID.Equals(storeId, StringComparison.OrdinalIgnoreCase) && p.Status != (int)DigitStatus.Cancel).OrderBy(or => or.ICardID).Select(o => o.ICardID).ToList(); return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, data_DigitCoin)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
public object GetChainStoreRuleList(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; string storeId = dicParas.ContainsKey("storeId") ? (dicParas["storeId"] + "") : string.Empty; string ruleType = dicParas.ContainsKey("ruleType") ? (dicParas["ruleType"] + "") : string.Empty; XCCloudUserTokenModel userTokenKeyModel = (XCCloudUserTokenModel)dicParas[Constant.XCCloudUserTokenModel]; string merchId = userTokenKeyModel.DataModel.MerchID; if (string.IsNullOrEmpty(storeId)) { errMsg = "门店ID不能为空"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } IBase_StoreInfoService base_StoreInfoService = BLLContainer.Resolve <IBase_StoreInfoService>(resolveNew: true); IBase_ChainRuleService base_ChainRuleService = BLLContainer.Resolve <IBase_ChainRuleService>(resolveNew: true); IBase_ChainRule_StoreService base_ChainRule_StoreService = BLLContainer.Resolve <IBase_ChainRule_StoreService>(resolveNew: true); var result = from a in base_ChainRuleService.GetModels(p => p.MerchID.Equals(merchId, StringComparison.OrdinalIgnoreCase)) join b in base_ChainRule_StoreService.GetModels(p => p.StoreID.Equals(storeId, StringComparison.OrdinalIgnoreCase)) on a.RuleGroupID equals b.RuleGroupID join c in base_ChainRule_StoreService.GetModels() on b.RuleGroupID equals c.RuleGroupID join d in base_StoreInfoService.GetModels() on c.StoreID equals d.StoreID where !c.StoreID.Equals(storeId, StringComparison.OrdinalIgnoreCase) select new { ID = c.ID, StoreName = d.StoreName, RuleType = a.RuleType }; if (!string.IsNullOrEmpty(ruleType)) { int iRuleType = Convert.ToInt32(ruleType); result = result.Where(w => w.RuleType == iRuleType); } return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, result)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
public object EnFreeRule(Dictionary <string, object> dicParas) { try { string errMsg = string.Empty; string id = dicParas.ContainsKey("id") ? (dicParas["id"] + "") : string.Empty; string state = dicParas.ContainsKey("state") ? (dicParas["state"] + "") : string.Empty; if (string.IsNullOrEmpty(id)) { errMsg = "送局规则ID不能为空"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } if (string.IsNullOrEmpty(state)) { errMsg = "启用状态state不能为空"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } int iState = Convert.ToInt32(state); int iId = Convert.ToInt32(id); IData_GameFreeRuleService data_GameFreeRuleService = BLLContainer.Resolve <IData_GameFreeRuleService>(); if (!data_GameFreeRuleService.Any(a => a.ID == iId)) { errMsg = "该送局规则信息不存在"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } var data_GameFreeRule = data_GameFreeRuleService.GetModels(p => p.ID == iId).FirstOrDefault(); data_GameFreeRule.State = iState; if (!data_GameFreeRuleService.Update(data_GameFreeRule)) { errMsg = "更新送局规则信息失败"; return(ResponseModelFactory.CreateFailModel(isSignKeyReturn, errMsg)); } return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
public string AddUserGrant(string userId, string ids) { //开启EF事务 using (TransactionScope ts = new TransactionScope()) { try { List <string> idList = ids.Split(',').ToList(); IBase_UserInfo_GrantService base_UserInfo_GrantService = BLLContainer.Resolve <IBase_UserInfo_GrantService>(); var base_UserInfo_GrantList = base_UserInfo_GrantService.GetModels(p => p.UserID.ToString().Equals(userId, StringComparison.OrdinalIgnoreCase)).ToList(); foreach (var base_UserInfo_Grant in base_UserInfo_GrantList) { if (!base_UserInfo_GrantService.Delete(base_UserInfo_Grant)) { return("权限添加失败"); } } foreach (var id in idList) { if (!string.IsNullOrEmpty(id)) { var base_UserInfo_Grant = new Base_UserInfo_Grant(); base_UserInfo_Grant.FunctionID = Convert.ToInt32(id); base_UserInfo_Grant.UserID = Convert.ToInt32(userId); base_UserInfo_Grant.IsAllow = 1; if (!base_UserInfo_GrantService.Add(base_UserInfo_Grant)) { return("权限添加失败"); } } } ts.Complete(); } catch (Exception ex) { return(ex.Message); } } return("权限添加成功"); }
public object GetJackpotDic(Dictionary <string, object> dicParas) { try { XCCloudUserTokenModel userTokenKeyModel = (XCCloudUserTokenModel)dicParas[Constant.XCCloudUserTokenModel]; string merchId = userTokenKeyModel.DataModel.MerchID; IData_JackpotInfoService data_JackpotInfoService = BLLContainer.Resolve <IData_JackpotInfoService>(); Dictionary <int, string> pJackpotList = data_JackpotInfoService.GetModels(p => p.MerchInfo.Equals(merchId, StringComparison.OrdinalIgnoreCase)) .Select(o => new { ID = o.ID, ActiveName = o.ActiveName }).Distinct() .ToDictionary(d => d.ID, d => d.ActiveName); return(ResponseModelFactory.CreateSuccessModel(isSignKeyReturn, pJackpotList)); } catch (Exception e) { return(ResponseModelFactory.CreateReturnModel(isSignKeyReturn, Return_Code.F, e.Message)); } }
/// <summary> /// 会员存币处理 /// </summary> /// <param name="iccard"></param> /// <param name="storeId"></param> /// <param name="balance"></param> /// <returns></returns> public static bool PreservationBusiness(int iccard, int storeId, int balance, out int lastBalance, out string storeName, out string mobile) { string errMsg = string.Empty; lastBalance = 0; storeName = string.Empty; mobile = string.Empty; StoreBusiness storeBusiness = new StoreBusiness(); StoreCacheModel storeModel = null; if (!storeBusiness.IsEffectiveStore(storeId.ToString(), ref storeModel, out errMsg)) { errMsg = "门店信息不存在"; return(false); } storeName = storeModel.StoreName; IMemberService memberService = BLLContainer.Resolve <IMemberService>(storeModel.StoreDBName); var model = memberService.GetModels(p => p.ICCardID == iccard).FirstOrDefault <t_member>(); if (model == null) { errMsg = "未查询到该店的会员信息"; return(false); } int num = 0; if (model.Balance == null) { num = 0; } else { num = (int)(model.Balance); } num += balance; model.Balance = num; lastBalance = (int)(model.Balance); mobile = model.Mobile; memberService.Update(model); return(true); }
public List<RsFactory> GetRsFactoryByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression<Func<RsFactory, bool>> whereLamda = SerializerHelper.ConvertParamWhereToLinq<RsFactory>(sWhere); using (IRsFactoryBLL RsFactoryBLL = BLLContainer.Resolve<IRsFactoryBLL>()) { List<RsFactory> models = RsFactoryBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return models; } }