Ejemplo n.º 1
0
 protected void GCGrid_RowCommand(object sender, FineUIPro.GridCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         object[]     key  = GCGrid.DataKeys[e.RowIndex];
         SqlParameter para = new SqlParameter("@id", key[0].ToString());
         if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(DB_JOB), CommandType.Text, "delete from web_usr where u_id =@id", para) > 0)
         {
             Alert.Show(MessageHelper.DELETE_SUCCESS);
             BindGrid(GCGrid.PageIndex);
         }
         else
         {
             Alert.Show(MessageHelper.DELETE_FAIL, MessageBoxIcon.Error);
         }
     }
     if (e.CommandName == "Up")
     {
         object[]     key  = GCGrid.DataKeys[e.RowIndex];
         SqlParameter para = new SqlParameter("@id", key[0].ToString());
         if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(DB_JOB), CommandType.Text, "update web_usr set u_type=1 where u_id =@id", para) > 0)
         {
             Alert.Show("提升成功");
             BindGrid(GCGrid.PageIndex);
         }
         else
         {
             Alert.Show("提升失败", MessageBoxIcon.Error);
         }
     }
 }
Ejemplo n.º 2
0
 protected void GridList_RowCommand(object sender, FineUIPro.GridCommandEventArgs e)
 {
     if (e.CommandName == "EXEC")
     {
         string menuId = GridList.DataKeys[e.RowIndex][0].ToString();
         DbHelperOra.ExecuteSql("update DAT_INFDATA_LOG set flag='Y' where seqno='" + menuId + "' ");
         DataSearch();
     }
 }
Ejemplo n.º 3
0
        protected void gridPic_RowCommand(object sender, FineUIPro.GridCommandEventArgs e)
        {
            //string gdseq = gridPic.Rows[ComRow()].Values[1].ToString();
            //string rowno = gridPic.Rows[ComRow()].Values[2].ToString();
            string gdseq = gridPic.Rows[e.RowIndex].DataKeys[0].ToString();
            string rowno = gridPic.Rows[e.RowIndex].DataKeys[1].ToString();

            if (e.CommandName == "shanchu")
            {
                int count = DbHelperOra.ExecuteSql(string.Format("delete from doc_goodspicture where gdseq = '{0}' and rowno = '{1}'", gdseq, rowno));
                if (count > 0)
                {
                    Alert.Show("删除成功!");
                    picSearch(gdseq);
                    DataTable dtt = DbHelperOra.Query(string.Format("select gdseq,rowno,decode(flag,'N','新增','Y','已发布','E','已取消') flag,gdpict,picpath from doc_goodspicture where gdseq='{0}'", hfdGDID.Text)).Tables[0];
                    if (dtt.Rows.Count == 0)
                    {
                        imgBMPPATH.ImageUrl = "~/res/images/model.png";
                        DbHelperOra.ExecuteSql(string.Format("update doc_goods set isflag4='N' where gdseq='{0}'", gdseq));
                    }
                }
                else
                {
                    Alert.Show("删除失败!");
                }
            }
            else if (e.CommandName == "lbfsava")
            {
                List <CommandInfo> lci = new List <CommandInfo>();
                JArray             ja  = gridPic.GetModifiedData();

                foreach (JToken jt in ja)
                {
                    int     selectedX;
                    JObject joValue = (JObject)jt;

                    selectedX = joValue.Value <Int16>("index");
                    JObject jo     = JObject.FromObject(joValue.Value <JObject>("values"));
                    string  gdseqq = gridPic.DataKeys[selectedX][0].ToString();
                    string  rownoo = gridPic.DataKeys[selectedX][1].ToString();
                    string  str1   = jo.Value <String>("STR1");
                    lci.Add(new CommandInfo(string.Format("update doc_goodspicture set STR1='{0}' where gdseq='{1}' and rowno='{2}'", str1, gdseq, rowno), null));
                }
                DbHelperOra.ExecuteSqlTran(lci);
                Alert.Show("修改【图片别名】成功!");
                picSearch(gdseq);
            }
        }
Ejemplo n.º 4
0
        protected void GridGoods_RowCommand(object sender, FineUIPro.GridCommandEventArgs e)
        {
            string strUserID   = GridGoods.Rows[e.RowIndex].Values[0].ToString();
            string strUserName = GridGoods.Rows[e.RowIndex].Values[1].ToString();

            if (e.CommandName == "Delete")
            {
                //DbHelperOra.ExecuteSql("UPDATE SYS_OPERUSER SET FLAG='-1' WHERE USERGH='" + strUserID + "'");
                dataSearch();
            }
            else
            {
                FineUIPro.PageContext.RegisterStartupScript(Window1.GetShowReference("~/AppFrame/UserEdith.aspx?id=" + strUserID, "用户【" + strUserName + "】信息修改"));
                Window1.Hidden = false;
            }
        }
Ejemplo n.º 5
0
 protected void Grid1_RowCommand(object sender, FineUIPro.GridCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         string seqno = GridList.DataKeys[e.RowIndex][0].ToString();
         if (DbHelperOra.ExecuteSql("UPDATE DAT_DO_LIST SET FLAG = 'Y' WHERE FLAG = 'N' AND SEQNO ='" + seqno + "'") > 0)
         {
             Alert.Show("清理完成");
             return;
         }
         else
         {
             Alert.Show("清理失败,请刷新页面或确认是否为显示状态");
             return;
         }
     }
 }
Ejemplo n.º 6
0
    protected void Grid1_RowCommand(object sender, FineUIPro.GridCommandEventArgs e)
    {
        object[]     key  = Grid1.DataKeys[e.RowIndex];
        SqlParameter para = new SqlParameter("@id", key[0].ToString());

        if (e.CommandName == "Delete")
        {
            if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(DB_JOB), CommandType.Text, "delete web_news where n_id=@id", para) > 0)
            {
                Alert.Show(MessageHelper.DELETE_SUCCESS);
                BindData(0);
            }
            else
            {
                Alert.Show(MessageHelper.DELETE_FAIL, MessageBoxIcon.Error);
            }
        }
    }
Ejemplo n.º 7
0
 protected void Grid1_RowCommand(object sender, FineUIPro.GridCommandEventArgs e)
 {
 }