Beispiel #1
0
 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);
             }
         }
     }
 }
Beispiel #2
0
    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);

                }
            }
        }
    }
Beispiel #3
0
    protected void ibtnComplain_Click(object sender, ImageClickEventArgs e)
    {
        Guid buyer = new Guid(lblBuyerID.Text.Trim());
        long phone = new long();

        phone = Convert.ToInt64(lblPhoneID.Text.Trim());
        long shopid = new long();

        shopid = Convert.ToInt64(lblShopID.Text.Trim());
        if (txtContent.Text != "")
        {
            ComplaintInfoTableAdapter comp = new ComplaintInfoTableAdapter();
            int Ccomp = comp.InsertComplain(buyer, shopid, phone, txtContent.Text, DateTime.Now, "1");

            if (Ccomp != 0)
            {
                //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('');", true);
                Response.Write("<script language=javascript>alert('\\n\\n投诉成功!');</script>");
            }
            else
            {
                //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('');", true);
                Response.Write("<script language=javascript>alert('抱歉!\\n\\n投诉失败,请重新填写!');</script>");
            }
        }
        else
        {
            //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('');", true);
            Response.Write("<script language=javascript>alert('请填写投诉内容!');</script>");
        }
    }
Beispiel #4
0
    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);
        }
    }
Beispiel #6
0
    protected void ibtnComplain_Click(object sender, ImageClickEventArgs e)
    {
        Guid buyer = new Guid(lblBuyerID.Text.Trim());
        long phone = new long();
        phone = Convert.ToInt64(lblPhoneID.Text.Trim());
        long shopid = new long();
        shopid = Convert.ToInt64(lblShopID.Text.Trim());
        if (txtContent.Text != "")
        {
            ComplaintInfoTableAdapter comp = new ComplaintInfoTableAdapter();
            int Ccomp = comp.InsertComplain(buyer, shopid, phone, txtContent.Text, DateTime.Now, "1");

            if (Ccomp != 0)
            {
                //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('');", true);
                Response.Write("<script language=javascript>alert('\\n\\n投诉成功!');</script>");

            }
            else
            {
                //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('');", true);
                Response.Write("<script language=javascript>alert('抱歉!\\n\\n投诉失败,请重新填写!');</script>");
            }

        }
        else
        {
            //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('');", true);
            Response.Write("<script language=javascript>alert('请填写投诉内容!');</script>");
        }
    }
    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);

        }
    }