public static string GetPids(int id) { try { return(SE_GiftManageConfigDAL.GetPids(ProcessConnection.OpenConfigurationReadOnly, id)); } catch (Exception ex) { throw ex; } }
public static SE_GiftManageConfigModel GetEntity(int Id) { try { return(SE_GiftManageConfigDAL.GetEntity(ProcessConnection.OpenConfigurationReadOnly, Id)); } catch (Exception ex) { throw ex; } }
public static IEnumerable <SE_GiftManageConfigModel> GetGiftLeveLs() { try { return(SE_GiftManageConfigDAL.SelectGiftLeveLs(ProcessConnection.OpenConfigurationReadOnly)); } catch (Exception ex) { throw ex; } }
public static int UpdateGiftLeveL(int pkid, int sort, string group) { try { return(SE_GiftManageConfigDAL.UpdateGiftLeveL(pkid, sort, group)); } catch (Exception ex) { throw ex; } }
public static List <string> GetByAllNodes() { try { return(SE_GiftManageConfigDAL.GetByAllNodes(ProcessConnection.OpenConfigurationReadOnly)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 查询产品信息 /// </summary> public static VW_ProductsModel GetVW_ProductsModel(string pid) { try { return(SE_GiftManageConfigDAL.GetVW_ProductsModel(ProcessConnection.OpenGungnirReadOnly, pid)); } catch (Exception ex) { throw ex; } }
public static bool Delete(int Id) { try { return(SE_GiftManageConfigDAL.Delete(ProcessConnection.OpenConfiguration, Id)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 删除库存信息 /// </summary> public static int DeleteGiftProductStock(string pid) { try { return(SE_GiftManageConfigDAL.DeleteGiftProductStock(pid)); } catch (Exception ex) { throw ex; } }
public static IEnumerable <SE_GiftManageConfigModel> SelectPages(int activtyType = 1, int pageIndex = 1, int pageSize = 20, string strWhere = "") { try { return(SE_GiftManageConfigDAL.SelectPages(ProcessConnection.OpenConfigurationReadOnly, activtyType, pageIndex, pageSize, strWhere)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 更新库存信息 /// </summary> public static int UpdateGiftProductStock(string pid, int stock) { try { return(SE_GiftManageConfigDAL.UpdateGiftProductStock(pid, stock)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 查询库存信息 /// </summary> public static int?GetGiftProductStock(string pid) { try { return(SE_GiftManageConfigDAL.GetGiftProductStock(ProcessConnection.OpenGungnirReadOnly, pid)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 批量查询查询产品信息 /// </summary> public static List <VW_ProductsModel> GetVW_ProductsModels(List <string> pids) { try { return(SE_GiftManageConfigDAL.GetVW_ProductsModels(ProcessConnection.OpenGungnirReadOnly, pids)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 检测PID是否存在 /// </summary> public static bool CheckPID(string pid) { try { return(SE_GiftManageConfigDAL.CheckPID(ProcessConnection.OpenGungnirReadOnly, pid)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 获取支付方式渠道集合 /// </summary> public static IEnumerable <ChannelDictionariesModel> GetU_ChannelPayList() { try { return(SE_GiftManageConfigDAL.GetU_ChannelPayListNew(ProcessConnection.OpenGungnirReadOnly)); } catch (Exception ex) { throw ex; } }
public static IEnumerable <SE_GiftManageConfigModel> SelectGiveAwayList(int id = 0) { try { return(SE_GiftManageConfigDAL.SelectGiveAwayList(ProcessConnection.OpenConfigurationReadOnly, id)); } catch (Exception ex) { logger.Error($"SelectGiveAwayList:{ex.Message}", ex); return(new List <SE_GiftManageConfigModel>()); } }
public static bool Insert(SE_GiftManageConfigModel model, SE_DictionaryConfigModel log) { try { var result = DiscountManageConfigDal.Insert(ProcessConnection.OpenConfiguration, model); log.ParentId = result; //var reGiftP = SE_GiftManageConfigDAL.DeleteGiftProductConfig(result); return(SE_GiftManageConfigDAL.InsertLog(ProcessConnection.OpenConfiguration, log)); } catch (Exception ex) { throw ex; } }
public static int DeleteGiftLeveLs(List <string> groups) { try { foreach (var group in groups) { SE_GiftManageConfigDAL.DeleteGiftLeveLs(group); } return(1); } catch (Exception ex) { throw ex; } }
public static bool Update(SE_GiftManageConfigModel model) { try { var giftFlag = true; var reGiftP = SE_GiftManageConfigDAL.DeleteGiftProductConfig(model.Id); giftFlag = giftFlag && reGiftP >= 0; var giftProductModels = JsonConvert.DeserializeObject <List <GiftStockModel2> >(model.GiftProducts); foreach (var g in giftProductModels) { g.RuleId = model.Id; giftFlag = giftFlag && SE_GiftManageConfigDAL.MergeIntoGiftProductStock(g.Pid, g.Stock, model.Id) > 0; giftFlag = giftFlag && SE_GiftManageConfigDAL.InsertGiftProductConfig(g) > 0; } return(SE_GiftManageConfigDAL.Update(ProcessConnection.OpenConfiguration, model) && giftFlag); } catch (Exception ex) { throw ex; } }
public static bool Insert(SE_GiftManageConfigModel model, SE_DictionaryConfigModel log) { try { var result = SE_GiftManageConfigDAL.Insert(ProcessConnection.OpenConfiguration, model); var giftFlag = true; log.ParentId = result; //var reGiftP = SE_GiftManageConfigDAL.DeleteGiftProductConfig(result); var giftProductModels = JsonConvert.DeserializeObject <List <GiftStockModel2> >(model.GiftProducts); foreach (var g in giftProductModels) { g.RuleId = result; giftFlag = giftFlag && SE_GiftManageConfigDAL.MergeIntoGiftProductStock(g.Pid, g.Stock, result) > 0; giftFlag = giftFlag && SE_GiftManageConfigDAL.InsertGiftProductConfig(g) > 0; } return(result > 0 && SE_GiftManageConfigDAL.InsertLog(ProcessConnection.OpenConfiguration, log) && giftFlag); } catch (Exception ex) { throw ex; } }
public static int SetDisabled() { return(SE_GiftManageConfigDAL.SetDisabled(ProcessConnection.OpenConfiguration)); }