/// <summary> /// 存储到数据库 /// </summary> /// <param name="list"></param> /// <returns></returns> private static bool SaveData(List <Model.BaseParameter> list) { Hashtable MyHs = new Hashtable(); SaveData(list, MyHs); return(CommonBase.RunHashtable(MyHs)); }
public static string Add(Model.Task model) { if (CommonBase.RunHashtable(Add(model, new Hashtable()))) { return("操作成功"); } return("操作失败"); }
public static bool ReSetSys() { Hashtable MyHs = new Hashtable(); StringBuilder sb = new StringBuilder(); sb.Append("delete from StockRightConfig;"); MyHs.Add(sb.ToString(), null); return(CommonBase.RunHashtable(MyHs)); }
/// <summary> /// 删除会员 /// </summary> /// <param name="mid"></param> /// <returns></returns> public static string DeleteMember(string midList) { string[] mids = midList.Split(','); Hashtable MyHs = new Hashtable(); int count = mids.Length; int successcount = 0; foreach (string mid in mids) { lock (DAL.Member.tempMemberList) { //DAl.Member.tempMemberList.Clear(); //Model.Member model = DAl.Member.GetModel(mid); //List<Model.ChangeMoney> ChangeMoneyList = ChangeMoneyCollection.GetChangeMoneyEntityList(string.Format("SHMID='{0}'", mid)); //List<Model.MConfigChange> MConfigChangeList = MConfigChange.GetMConfigChangeEntityList(string.Format("SHMID='{0}'", mid)); //DAl.Member.tempMemberList.Clear();//清空临时字典 //string guid = Guid.NewGuid().ToString(); //foreach (Model.ChangeMoney item in ChangeMoneyList) //{ // if (item.CState) // { // DAl.ChangeMoney.TranChangeTran(item.ToMID, item.FromMID, item.Money - item.TakeOffMoney, item.MoneyType, MyHs); // } //} //foreach (Model.MConfigChange item in MConfigChangeList) //{ // guid = Guid.NewGuid().ToString(); // if (item.IsValue) // { // MyHs.Add(string.Format("update MemberConfig set {0} = '{1}' where MID = '{2}' " + " and '" + guid + "'='" + guid + "'", item.ConfigName, item.ConfigValue, item.MID), null); // } // else // { // MyHs.Add(string.Format("update MemberConfig set {0} ={0}- {1} where MID = '{2}' " + " and '" + guid + "'='" + guid + "'", item.ConfigName, item.ConfigValue, item.MID), null); // } //} MyHs.Add(string.Format("delete from ChangeMoney where SHMID='{0}'", mid), null); MyHs.Add(string.Format("delete from Member where MID='{0}'", mid), null); MyHs.Add(string.Format("delete from MemberConfig where MID='{0}'", mid), null); MyHs.Add(string.Format("delete from MConfigChange where SHMID='{0}'", mid), null); if (CommonBase.RunHashtable(MyHs)) { DAL.Member.tempMemberList.Clear();//清空临时字典 successcount++; } } } DAL.Member.tempMemberList.Clear();//清空临时字典 return(string.Format("成功:{0},失败{1}", successcount, count - successcount)); }
/// <summary> /// 删除会员 /// </summary> /// <param name="mid"></param> /// <returns></returns> public static string DeleteMemberW(string midList, Model.Member shmodel) { string[] mids = midList.Split(','); Hashtable MyHs = new Hashtable(); int count = mids.Length; foreach (string mid in mids) { Model.Member model = DAL.Member.GetModel(mid); if (model.AgencyCode == "001") { MyHs.Add("delete from member where mid='" + model.MID + "'; delete from memberconfig where mid ='" + model.MID + "';", null); } else { return("已审核的会员不能删除"); } } if (CommonBase.RunHashtable(MyHs)) { return("操作成功"); } return("操作失败"); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(yny_002.Model.StockRight model) { return(CommonBase.RunHashtable(Update(model, new Hashtable()))); }
public static System.Data.DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("[Accounts]", "ACode", "CreateDate asc,ACode asc", strWhere, pageIndex, pageSize, out count)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(yny_002.Model.QuitRecord model) { return(CommonBase.RunHashtable(Update(model, new Hashtable()))); }
/// <summary> /// 分页查询 /// </summary> /// <param name="query"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <param name="totalCount"></param> /// <returns></returns> public static IEnumerable <Model.OperationRecord> QueryByPage(Model.QueryOperationRecord query, int pageIndex, int pageSize, out int totalCount) { string where = GetWhere(query); return(CommonBase.GetTable("Member_OperationRecord", "ID", "ID DESC", where, pageIndex, pageSize, out totalCount).AsEnumerable().Select(row => row.ToEntity <Model.OperationRecord>())); }
/// <summary> /// 得到分页会员信息数据 /// </summary> /// <param name="strWhere">查询条件</param> /// <param name="pageIndex">页码</param> /// <param name="pageSize">页大小</param> /// <param name="count">out类型总计</param> /// <returns>返回DataTable</returns> private static DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("Agents", "ID", "ID desc", strWhere, pageIndex, pageSize, out count)); }
public static System.Data.DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("SMS", "SID", "SID", strWhere, pageIndex, pageSize, out count)); }
/// <summary> /// 得到分页会员信息数据 /// </summary> /// <param name="strWhere">查询条件</param> /// <param name="pageIndex">页码</param> /// <param name="pageSize">页大小</param> /// <param name="count">out类型总计</param> /// <returns>返回DataTable</returns> public static DataTable GetTableQ(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("View_LuckyMoney", "ID", "EditTime desc, ID asc", strWhere, pageIndex, pageSize, out count)); }
/// <summary> /// 更新一条数据 /// </summary> public static bool Update(yny_002.Model.LuckyMoney model) { return(CommonBase.RunHashtable(Update(model, new Hashtable()))); }
/// <summary> /// 得到分页会员信息数据 /// </summary> /// <param name="strWhere">查询条件</param> /// <param name="pageIndex">页码</param> /// <param name="pageSize">页大小</param> /// <param name="count">out类型总计</param> /// <returns>返回DataTable</returns> private static DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("Member", "MID", "MDate asc,MCreateDate asc,MID asc", strWhere, pageIndex, pageSize, out count)); }
public static System.Data.DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("MemberBonus", "Code", "ID asc,Code asc", strWhere, pageIndex, pageSize, out count)); }
public static System.Data.DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("BonusList", "Code", "ID desc,BonusCode desc", strWhere, pageIndex, pageSize, out count)); }
/// <summary> /// 得到分页会员信息数据 /// </summary> /// <param name="strWhere">查询条件</param> /// <param name="pageIndex">页码</param> /// <param name="pageSize">页大小</param> /// <param name="count">out类型总计</param> /// <returns>返回DataTable</returns> public static DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count) { return(CommonBase.GetTable("C_Code", "C_ID", "C_ID asc", strWhere, pageIndex, pageSize, out count)); }
public static System.Data.DataTable GetTable(string strWhere, int pageIndex, int pageSize, out int count, string orderBy) { return(CommonBase.GetTable("BMember", "BMID", orderBy, strWhere, pageIndex, pageSize, out count)); }