/// <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_003.Model.StockRight model) { return(CommonBase.RunHashtable(Update(model, new Hashtable()))); }
/// <summary> /// 更新一条数据 /// </summary> public static bool Update(yny_003.Model.LuckyMoney model) { return(CommonBase.RunHashtable(Update(model, new Hashtable()))); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(yny_003.Model.QuitRecord model) { return(CommonBase.RunHashtable(Update(model, new Hashtable()))); }