Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
 public static string Add(Model.Task model)
 {
     if (CommonBase.RunHashtable(Add(model, new Hashtable())))
     {
         return("操作成功");
     }
     return("操作失败");
 }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        /// <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));
        }
Exemplo n.º 5
0
        /// <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("操作失败");
        }
Exemplo n.º 6
0
 /// <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("BCenter", "MID", "AddDate asc,MID asc", strWhere, pageIndex, pageSize, out count));
 }
Exemplo n.º 7
0
 /// <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);
 }
Exemplo n.º 8
0
 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));
 }
Exemplo n.º 9
0
 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));
 }
Exemplo n.º 10
0
 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));
 }
Exemplo n.º 11
0
 /// <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));
 }
Exemplo n.º 12
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public static bool Update(yny_003.Model.LuckyMoney model)
 {
     return(CommonBase.RunHashtable(Update(model, new Hashtable())));
 }
Exemplo n.º 13
0
 /// <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>()));
 }
Exemplo n.º 14
0
 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));
 }
Exemplo n.º 15
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(yny_003.Model.QuitRecord model)
 {
     return(CommonBase.RunHashtable(Update(model, new Hashtable())));
 }
Exemplo n.º 16
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(yny_003.Model.StockRight model)
 {
     return(CommonBase.RunHashtable(Update(model, new Hashtable())));
 }
Exemplo n.º 17
0
 /// <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));
 }
Exemplo n.º 18
0
 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));
 }