/// <summary> /// 开启和关闭自动评价 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void imgBtnOpenRatingAtuo_Click(object sender, ImageClickEventArgs e) { RatingBLL objRate = new RatingBLL(); if (!objRate.CheckRateConfigIsExit(Users.Nick)) { //Response.Write("<script>alert('先保存评价设置,才能开启自动评价!');</script>"); Label2.Text = "先保存评价设置,才能开启自动评价!"; Label2.Visible = true; return; } else if (RatingBLL.isBshop(Users.Nick)) { Label2.Text = "天猫卖家不能使用自动评价功能!"; Label2.Visible = true; return; } else { DataTable tb = objRate.GetRateConfigByNick(Users.Nick); if (tb != null && tb.Rows.Count > 0) { if (tb.Rows[0]["isAutoRating"].ToString().Equals("1")) { imgBtnOpenRatingAtuo.ImageUrl = "~/images/1close.png"; objRate.UpdateAutoRatingStatus(Users.Nick, 0); } else { imgBtnOpenRatingAtuo.ImageUrl = "~/images/2open.png"; objRate.UpdateAutoRatingStatus(Users.Nick, 1); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //ExceptionReporter.WriteLog("OrderVersion:" + Users.OrderVersion, ExceptionPostion.TBApply_Data, ExceptionRank.important); //if (!Users.OrderVersion.Equals("自动评价版") && !Users.OrderVersion.Equals("全功能版")) //{ // Response.Write("<script languge='javascript'>alert('没有权限使用,请订购对应的软件版本'); window.location.href='http://fuwu.taobao.com/ser/detail.htm?service_code=ts-1811102'</script>"); // return; //} //versionControl.Visible = false; //HyperLink1.Visible = false; //初始化页面配置 RatingBLL objBll = new RatingBLL(); DataTable tb = objBll.GetRateConfigByNick(Users.Nick); if (tb != null && tb.Rows.Count > 0) { if (tb.Rows[0]["isAutoRating"].ToString().Equals("1")) { imgBtnOpenRatingAtuo.ImageUrl = "~/Images/2open.png"; } else { imgBtnOpenRatingAtuo.ImageUrl = "~/Images/1close.png"; } if (tb.Rows[0]["isMiaoRate"].ToString().Equals("1")) { rdoMiaoPing.Checked = true; } if (tb.Rows[0]["isWaitBuyerRate"].ToString().Equals("1")) { rdoBuyerRated.Checked = true; } drpFangAn2Day.SelectedValue = tb.Rows[0]["waitBuyerTimeDay"].ToString(); drpFangAn2Hour.SelectedValue = tb.Rows[0]["waitBuyerTimeHour"].ToString(); drpFangAn2Minute.SelectedValue = tb.Rows[0]["waitBuyerTimeFen"].ToString(); if (tb.Rows[0]["blackBuyerRatedIsRate"].ToString().Equals("1")) { rdoFangAn2NotAtuo.Checked = true; } if (tb.Rows[0]["blackBuyerRatedIsRate"].ToString().Equals("2")) { rdoFangAn2AtuoGoodRate.Checked = true; } if (tb.Rows[0]["blackBuyerRatedIsRate"].ToString().Equals("3")) { rdoFangAn2AtuoNureRate.Checked = true; } if (tb.Rows[0]["blackBuyerRatedIsRate"].ToString().Equals("4")) { rdoFangAn2AtuoPoolRate.Checked = true; } drpFangAn2BacklstDay.SelectedValue = tb.Rows[0]["blackBuyerNoRateQiangRateDay"].ToString(); drpFangAn2BacklstHour.SelectedValue = tb.Rows[0]["blackBuyerNoRateQiangRateHour"].ToString(); drpFangAn2BacklstMinute.SelectedValue = tb.Rows[0]["blackBuyerNoRateQiangRateFen"].ToString(); if (tb.Rows[0]["isQiangRate"].ToString().Equals("1")) { rdoAutoRate.Checked = true; } drpFangAn3Day.SelectedValue = tb.Rows[0]["qiangRateTimeDay"].ToString(); drpFangAn3Hour.SelectedValue = tb.Rows[0]["qiangRateTimeHour"].ToString(); drpFangAn3Minute.SelectedValue = tb.Rows[0]["qiangRateTimeFen"].ToString(); if (tb.Rows[0]["atuoAddBlackListBadRate"].ToString().Equals("1")) { cbBlakList.Checked = true; } if (tb.Rows[0]["atuoAddBlackListTuiKuan"].ToString().Equals("1")) { cbAddBlacklstTuikuan.Checked = true; } drpContentChoice.SelectedValue = tb.Rows[0]["contentChoice"].ToString(); txtPoolRateContent.Text = tb.Rows[0]["badRateContent"].ToString(); txtRateTemp1.Text = tb.Rows[0]["content1"].ToString(); txtRateTemp2.Text = tb.Rows[0]["content2"].ToString(); txtRateTemp3.Text = tb.Rows[0]["content3"].ToString(); } } lberror2.Text = ""; Label2.Text = ""; Page.MaintainScrollPositionOnPostBack = true; }