protected void btngoodscomp_Click(object sender, EventArgs e) { for (int i = 0; i <= gdvcompmana.Rows.Count - 1; i++) { CheckBox cbox = (CheckBox)gdvcompmana.Rows[i].FindControl("cbxselphoneid"); Label lblid = (Label)gdvcompmana.Rows[i].FindControl("lblgoods"); if (cbox.Checked == true) { string compid = lblid.Text; ComplaintInfoTableAdapter compstate = new ComplaintInfoTableAdapter(); long id = new long(); id = Convert.ToInt64(compid); int result = compstate.Updatecomplaintstate("2", id); if (result == -1) { Response.Write("<script language=javascript>alert('温馨提示:\\n\\n用户店铺状态已改为通过!');</script>"); Response.Write("<script language=javascript>window.location.href='goodscompmanage.aspx'</script>"); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n投诉状态由于一些原因设置失败!');", true); } } } }
protected void btngoodscomp_Click(object sender, EventArgs e) { for (int i = 0; i <= gdvcompmana.Rows.Count - 1; i++) { CheckBox cbox = (CheckBox)gdvcompmana.Rows[i].FindControl("cbxselphoneid"); Label lblid = (Label)gdvcompmana.Rows[i].FindControl("lblgoods"); if (cbox.Checked == true) { string compid = lblid.Text; ComplaintInfoTableAdapter compstate = new ComplaintInfoTableAdapter(); long id = new long(); id = Convert.ToInt64(compid); int result = compstate.Updatecomplaintstate("2", id); if (result ==-1) { Response.Write("<script language=javascript>alert('温馨提示:\\n\\n用户店铺状态已改为通过!');</script>"); Response.Write("<script language=javascript>window.location.href='goodscompmanage.aspx'</script>"); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n投诉状态由于一些原因设置失败!');", true); } } } }
protected void dlphonecomp_UpdateCommand(object source, DataListCommandEventArgs e) { string compid = dlphonecomp.DataKeys[e.Item.ItemIndex].ToString(); ComplaintInfoTableAdapter compstate = new ComplaintInfoTableAdapter(); long id = new long(); id = Convert.ToInt64(compid); int result = compstate.Updatecomplaintstate("2", id); if (result > 0) { Response.Write("<script language=javascript>window.location.href='phonecompmanage.aspx'</script>"); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n投诉状态由于一些原因设置失败!');", true); } }
protected void gdvcompmana_RowUpdating(object sender, GridViewUpdateEventArgs e) { gdvcompmana.DataKeyNames = new string[] { "complaint_id" }; string compid = gdvcompmana.DataKeys[e.RowIndex].Value.ToString(); ComplaintInfoTableAdapter compstate = new ComplaintInfoTableAdapter(); long id = new long(); id = Convert.ToInt64(compid); int result = compstate.Updatecomplaintstate("2", id); if (result > 0) { //Response.Write("<script language=javascript>window.location.href='goodscompmanage.aspx'</script>"); Response.Redirect("../Admin/goodscompmanage.aspx"); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n投诉状态由于一些原因设置失败!');", true); } }
protected void dlphonecomp_UpdateCommand(object source, DataListCommandEventArgs e) { string compid = dlphonecomp.DataKeys[e.Item.ItemIndex].ToString(); ComplaintInfoTableAdapter compstate = new ComplaintInfoTableAdapter(); long id = new long(); id = Convert.ToInt64(compid); int result = compstate.Updatecomplaintstate("2", id); if (result > 0) { Response.Write("<script language=javascript>window.location.href='phonecompmanage.aspx'</script>"); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n投诉状态由于一些原因设置失败!');", true); } }
protected void gdvcompmana_RowUpdating(object sender, GridViewUpdateEventArgs e) { gdvcompmana.DataKeyNames = new string[] { "complaint_id" }; string compid = gdvcompmana.DataKeys[e.RowIndex].Value.ToString(); ComplaintInfoTableAdapter compstate = new ComplaintInfoTableAdapter(); long id = new long(); id = Convert.ToInt64(compid); int result = compstate.Updatecomplaintstate("2", id); if (result > 0) { //Response.Write("<script language=javascript>window.location.href='goodscompmanage.aspx'</script>"); Response.Redirect("../Admin/goodscompmanage.aspx"); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n投诉状态由于一些原因设置失败!');", true); } }