示例#1
0
        public int CountIp(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "select count(distinct(Ip)) from zl_hits where id in(" + ids + ")";

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(CommandType.Text, sql)));
        }
示例#2
0
        public bool DelByIDS(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "DELETE FROM " + TbName + " WHERE ID IN (" + ids + ")";

            return(SqlHelper.ExecuteSql(sql));
        }
示例#3
0
        private DataTable Content_SelByNid(int siteID, string nids)//需要改为不依靠登录用户获取
        {
            string where = "";
            if (string.IsNullOrEmpty(nids))
            {
                DataTable dt = Node_Sel(siteID);
                foreach (DataRow dr in dt.Rows)
                {
                    nids += dr["NodeID"] + ",";
                }
                nids = nids.TrimEnd(',');
            }
            SafeSC.CheckIDSEx(nids);
            where += " A.NodeID IN(" + nids + ")";
            PageSetting setting = new PageSetting()
            {
                cpage  = CPage,
                psize  = PSize,
                fields = "A.*,B.synopsis",
                t1     = "ZL_CommonModel",
                t2     = "ZL_C_Article",
                on     = "A.ItemID=B.ID",
                where  = where,
                order  = "A.GeneralID DESC"
            };

            return(DBCenter.SelPage(setting));
        }
示例#4
0
        public bool DelByUid(string ids, int uid)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "Update " + TbName + " Set Status=" + (int)ZLEnum.ConStatus.Recycle + " Where ID IN(" + ids + ") And UserID=" + uid;

            return(SqlHelper.ExecuteSql(sql));
        }
示例#5
0
        public bool UpdateStatuByIDS(string ids, int status)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "UPDATE " + TbName + " SET [Status]=" + status + " WHERE ID IN (" + ids + ")";

            return(SqlHelper.ExecuteSql(sql));
        }
示例#6
0
    public bool DelByIds(string ids)
    {
        SafeSC.CheckIDSEx(ids);
        string sql = "Delete From " + TbName + " Where ID IN (" + ids + ")";

        return(SqlHelper.ExecuteSql(sql));
    }
示例#7
0
        public void DelByIDS(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "Delete from ZL_Plat_Task where ID in(" + ids + ")";

            SqlHelper.ExecuteNonQuery(CommandType.Text, sql);
        }
示例#8
0
    private string GetWhere(Com_Filter filter, List <SqlParameter> sp)
    {
        string where = "B.PaymentStatus=1 AND A.AllMoney_Json IS NOT NULL";
        if (filter.storeId != -100)
        {
            where += " AND B.StoreID=" + filter.storeId;
        }
        //技师用户ID
        if (!string.IsNullOrEmpty(filter.uids))
        {
            SafeSC.CheckIDSEx(filter.uids);
            where += " AND (A.Code IS NOT NULL AND A.Code IN (" + filter.uids + "))";
        }
        if (!string.IsNullOrEmpty(filter.uname))
        {
            sp.Add(new SqlParameter("uname", "%" + filter.uname + "%"));
            where += " AND A.Attribute LIKE @uname";
        }
        if (!string.IsNullOrEmpty(filter.skey))
        {
            sp.Add(new SqlParameter("skey", "%" + filter.skey + "%"));
            where += " AND A.Proname LIKE @skey";
        }
        DateTime time = DateTime.Now;

        if (!string.IsNullOrEmpty(filter.stime) && DateTime.TryParse(filter.stime, out time))
        {
            where += " AND A.AddTime>='" + filter.stime + "'";
        }
        if (!string.IsNullOrEmpty(filter.etime) && DateTime.TryParse(filter.etime, out time))
        {
            where += " AND A.AddTime<='" + filter.etime + "'";
        }
        return(where);
    }
示例#9
0
        public void DelByIDS(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "DELETE FROM " + strTableName + " WHERE " + PK + " IN(" + ids + ")";

            SqlHelper.ExecuteSql(sql);
        }
示例#10
0
        public ActionResult ClientView()
        {
            if (Mid < 1)
            {
                function.WriteErrMsg("未指定客户信息"); return(null);
            }
            if (!B_ARoleAuth.AuthCheckEx(ZLEnum.Auth.office, "crm"))
            {
                return(null);
            }
            M_CRMS_Client clientMod = new M_CRMS_Client();
            M_ModelInfo   modMod    = modBll.SelReturnModel(48);

            ViewBag.fieldDT = new B_ModelField().SelByModelID(modMod.ModelID, false, false);

            clientMod = clientBll.SelReturnModel(Mid);
            if (!string.IsNullOrEmpty(modMod.TableName) && clientMod.ItemID > 0)
            {
                ViewBag.valueDT = DBCenter.Sel(modMod.TableName, "ID=" + clientMod.ItemID);
            }
            ViewBag.conSetting = contactBll.SelPage(CPage, PSize, new F_CRMS_Contact()
            {
                ClientID = clientMod.ID
            });
            if (!string.IsNullOrEmpty(clientMod.LinkIds))
            {
                SafeSC.CheckIDSEx(clientMod.LinkIds);
                ViewBag.linkDT = DBCenter.SelWithField(clientMod.TbName, "id,ClientName AS name,phone", "ID IN (" + clientMod.LinkIds + ")");
            }
            return(View(clientMod));
        }
示例#11
0
        /// <summary>
        /// 更新状态
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public bool Update(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "update [dbo].[ZL_Hits] set status=-2 where id in (" + ids + ")";

            return(SqlHelper.ExecuteSql(sql));
        }
示例#12
0
文件: B_Temp.cs 项目: baixue001/IPS
        /// <summary>
        /// 批量确认提现
        /// </summary>
        /// <returns></returns>
        public bool CheckByIds(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "Update " + TbName + " Set Str3=99 Where ID IN(" + ids + ") And Str3!='-1'";

            return(SqlHelper.ExecuteSql(sql));
        }
示例#13
0
        public ContentResult PubInfo_API()
        {
            string action = GetParam("action");
            int    pubId  = DataConvert.CLng(GetParam("pubid"));
            string ids    = GetParam("ids");

            SafeSC.CheckIDSEx(ids);
            M_Pub pubMod = pubBll.SelReturnModel(pubId);

            if (pubMod == null)
            {
                throw new Exception("未指定互动模型");
            }
            switch (action)
            {
            case "del":
                DBCenter.DelByIDS(pubMod.PubTableName, "ID", ids);
                break;

            case "audit":
                DBCenter.UpdateSQL(pubMod.PubTableName, "PubStart=1", "ID IN (" + ids + ")");
                break;

            case "cancel":
                DBCenter.UpdateSQL(pubMod.PubTableName, "PubStart=0", "ID IN (" + ids + ")");
                break;
            }
            return(Content(Success.ToString()));
        }
示例#14
0
        public bool DelByIDS(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            string sql = "Delete " + strTableName + " Where " + PK + " in (" + ids + ")";

            SqlHelper.ExecuteNonQuery(CommandType.Text, sql);
            return(true);
        }
示例#15
0
 public bool RealDelByIDS(string ids, string items)
 {
     SafeSC.CheckDataEx(items);
     SafeSC.CheckIDSEx(ids);
     DBCenter.DelByIDS(TbName, PK, ids);
     DBCenter.DelByIDS("ZL_P_Shop", "ID", items);
     return(true);
 }
示例#16
0
        /// <summary>
        /// 从数据库中移动商品相关信息
        /// </summary>
        public bool RealDelByIDS(string ids)
        {
            SafeSC.CheckIDSEx(ids);
            DataTable dt    = DBCenter.Sel(TbName, "ID IN (" + ids + ")");
            string    items = StrHelper.GetIDSFromDT(dt, "ItemID");

            return(RealDelByIDS(ids, items));
        }
示例#17
0
        /// <summary>
        /// 批量修改黄页样式
        /// </summary>
        public void UpldateByIds(string ids, int styleID)
        {
            string sql = "Update " + strTableName + " Set NodeStyle=" + styleID + " Where ID in({0})";

            SafeSC.CheckIDSEx(ids);
            sql = string.Format(sql, ids);
            SqlHelper.ExecuteNonQuery(CommandType.Text, sql);
        }
示例#18
0
        protected void EBtnSubmit_Click(object sender, EventArgs e)
        {
            string ModeItem = GroupModel.SelectedValue;

            SafeSC.CheckIDSEx(ModeItem);
            Gll.SetGroupModel(Mid, ModeItem);
            function.WriteSuccessMsg("设置成功", "GroupManage.aspx");
        }
示例#19
0
 public void Del(string ids)
 {
     if (string.IsNullOrEmpty(ids))
     {
         return;
     }
     SafeSC.CheckIDSEx(ids);
     DBCenter.DelByIDS(TbName, PK, ids);
 }
示例#20
0
 public void UpdateStatus(string ids, int status)
 {
     if (string.IsNullOrEmpty(ids))
     {
         return;
     }
     SafeSC.CheckIDSEx(ids);
     DBCenter.UpdateSQL(TbName, "ZStatus=" + status, "ID IN (" + ids + ")");
 }
示例#21
0
 public void Del(string ids)
 {
     if (string.IsNullOrEmpty(ids))
     {
         return;
     }
     SafeSC.CheckIDSEx(ids);
     DBCenter.DelByWhere(TbName, PK + " IN (" + ids + ")");
 }
示例#22
0
 public bool DelByIDS(string ids)
 {
     if (string.IsNullOrEmpty(ids))
     {
         return(false);
     }
     SafeSC.CheckIDSEx(ids);
     return(DBCenter.DelByIDS(TbName, PK, ids));
 }
示例#23
0
文件: B_Node.cs 项目: baixue001/IPS
 /// <summary>
 /// 获取选定的单页节点信息
 /// </summary>
 public DataTable GetCreateSingleByID(string nids)
 {
     if (string.IsNullOrEmpty(nids))
     {
         return(null);
     }
     SafeSC.CheckIDSEx(nids);
     return(DBCenter.Sel(TbName, "NodeType=2 and NodeID in (" + nids + ")", "OrderID"));
 }
示例#24
0
文件: B_Node.cs 项目: baixue001/IPS
 public void Reconvery(string nids)
 {
     if (string.IsNullOrEmpty(nids))
     {
         return;
     }
     SafeSC.CheckIDSEx(nids);
     DBCenter.UpdateSQL(TbName, "ZStatus=99", "NodeID IN (" + nids + ")");
 }
示例#25
0
文件: B_Node.cs 项目: baixue001/IPS
 /// <summary>
 /// 删除节点,并删除该节点的子节点
 /// </summary>
 public void DelNode(string nids)
 {
     if (string.IsNullOrEmpty(nids))
     {
         return;
     }
     SafeSC.CheckIDSEx(nids);
     DBCenter.DelByWhere(TbName, "NodeID IN(" + nids + ")");
 }
示例#26
0
 public void Audit(string ids, int audit)
 {
     if (string.IsNullOrEmpty(ids))
     {
         return;
     }
     SafeSC.CheckIDSEx(ids);
     DBCenter.UpdateSQL(TbName, "Audit=" + audit, "ID IN (" + ids + ")");
 }
示例#27
0
 /// <summary>
 /// 恢复信息
 /// </summary>
 public void RelByIDS(string ids)
 {
     if (string.IsNullOrEmpty(ids))
     {
         return;
     }
     SafeSC.CheckIDSEx(ids);
     DBCenter.UpdateSQL(TbName, "Status=1", "ID IN (" + ids + ")");
 }
示例#28
0
        public ContentResult Product_API()
        {
            string action = GetParam("action");
            string ids    = GetParam("ids");

            switch (action)
            {
            //case "upmove":
            //    {
            //        M_Product product = proBll.GetproductByid(Mid);
            //        M_Product productPre = proBll.GetNearID(NodeID, product.OrderID, 1);           //int NodeID, int CurrentID, int UporDown
            //        if (productPre.OrderID != 0)
            //        {
            //            int CurrOrder = product.OrderID;
            //            product.OrderID = productPre.OrderID;
            //            productPre.OrderID = CurrOrder;
            //            proBll.UpdateOrder(product);
            //            proBll.UpdateOrder(productPre);
            //        }
            //    }
            //    break;
            //case "downmove":
            //    {
            //        M_Product product = proBll.GetproductByid(Mid);
            //        M_Product productPre = proBll.GetNearID(NodeID, product.OrderID, 0);
            //        if (productPre.ID != 0)
            //        {
            //            int CurrOrder = product.OrderID;
            //            product.OrderID = productPre.OrderID;
            //            productPre.OrderID = CurrOrder;
            //            proBll.UpdateOrder(product);
            //            proBll.UpdateOrder(productPre);
            //        }
            //    }
            //    break;
            case "refresh":    //刷新/重发布,将商品ctreatime和updatatime改为当前值
                SafeSC.CheckIDSEx(ids);
                string date = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
                DBCenter.UpdateSQL(proBll.TbName, "AddTime='" + date + "',UpdateTime='" + date + "'", "ID IN (" + ids + ")");
                break;

            case "del":
                SafeSC.CheckIDSEx(ids);
                proBll.RealDelByIDS(ids);
                break;

            case "clear":
                proBll.ClearRecycle();
                break;

            default:
                proBll.setproduct(action, ids);
                break;
            }
            return(Content(Success.ToString()));
        }
示例#29
0
 /// <summary>
 /// 为角色添加新用户
 /// </summary>
 public void AddToRole(string uids, int roleId)
 {
     if (string.IsNullOrEmpty(uids) || roleId < 1)
     {
         return;
     }
     SafeSC.CheckIDSEx(uids);
     string where = "UserID IN (" + uids + ")";
     DBCenter.UpdateSQL(TbName, "UserRole=UserRole+'," + roleId + ",'", where);
 }
示例#30
0
文件: B_Node.cs 项目: baixue001/IPS
 public void DelModelTemplate(int NodeID, string ModelIDs)
 {
     ModelIDs = StrHelper.PureIDSForDB(ModelIDs);
     if (string.IsNullOrEmpty(ModelIDs))
     {
         return;
     }
     SafeSC.CheckIDSEx(ModelIDs);
     DBCenter.DelByWhere("ZL_Node_ModelTemplate", "NodeID=" + NodeID + " AND ModelID Not IN (" + ModelIDs + ")");
 }