protected void GridView4_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string State = GridView4.DataKeys[e.Row.RowIndex].Values["btstate"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; //状态 if (State == "1") { lb_state.Text = "未处理"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (State == "2") { lb_state.Text = "已完成"; lb_state.ForeColor = System.Drawing.Color.Red; lb_state.Font.Bold = true; } //判断是否是编辑状态 if (GridView4.EditIndex != e.Row.RowIndex) { } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string State = GridView1.DataKeys[e.Row.RowIndex].Values["pstate"].ToString(); int ptid = Convert.ToInt32(GridView1.DataKeys[e.Row.RowIndex].Values["ptid"]); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; Label lbl_type = e.Row.FindControl("lbl_type") as Label; if (State == "1") { lb_state.Text = "启用"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (State == "2") { lb_state.Text = "禁用"; lb_state.ForeColor = System.Drawing.Color.Red; } pages_type pt = BLL.pages_typeManager.SearchByID(ptid); if (pt != null) { lbl_type.Text = pt.ptname; } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string rgcode = GridView1.DataKeys[e.Row.RowIndex].Values["rgcode"].ToString(); string cid = GridView1.DataKeys[e.Row.RowIndex].Values["cid"].ToString(); HyperLink hl_code = e.Row.FindControl("hl_code") as HyperLink; if (cid == "1") { hl_code.NavigateUrl = "http://www.kiees.cn/yto.php?wen=" + rgcode; } else if (cid == "2") { hl_code.NavigateUrl = "http://www.kiees.cn/sto.php?wen=" + rgcode; } else { hl_code.NavigateUrl = "http://www.kiees.cn/xuan.php?wen=" + rgcode; } hl_code.ForeColor = System.Drawing.Color.Blue; } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string sdastate = GridView1.DataKeys[e.Row.RowIndex].Values["astate"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; if (sdastate == "1") { lb_state.Text = "未使用"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (sdastate == "2") { lb_state.Text = "已使用"; lb_state.ForeColor = System.Drawing.Color.Red; } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string spstate = GridView1.DataKeys[e.Row.RowIndex].Values["spstate"].ToString(); string sptype = GridView1.DataKeys[e.Row.RowIndex].Values["sptype"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; LinkButton lb_type = e.Row.FindControl("lb_type") as LinkButton; if (spstate == "1") { lb_state.Text = "正常"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (spstate == "2") { lb_state.Text = "禁用"; lb_state.ForeColor = System.Drawing.Color.Red; } if (sptype == "1") { lb_type.Text = "普通评语"; lb_type.ForeColor = System.Drawing.Color.Blue; } else if (sptype == "2") { lb_type.Text = "质量评语"; lb_type.ForeColor = System.Drawing.Color.Green; } else if (sptype == "3") { lb_type.Text = "结束评语"; lb_type.ForeColor = System.Drawing.Color.Red; } //else if (sptype == "4") //{ // lb_type.Text = "价格评语"; // lb_type.ForeColor = System.Drawing.Color.Gainsboro; //} //else if (sptype == "5") //{ // lb_type.Text = "普通评语"; // lb_type.ForeColor = System.Drawing.Color.Green; //} //else if (sptype == "6") //{ // lb_type.Text = "结束评语"; // lb_type.ForeColor = System.Drawing.Color.Red; //} } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string srstate = GridView1.DataKeys[e.Row.RowIndex].Values["srstate"].ToString(); string srtype = GridView1.DataKeys[e.Row.RowIndex].Values["srtype"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; LinkButton lb_type = e.Row.FindControl("lb_type") as LinkButton; if (srstate == "1") { lb_state.Text = "正常"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (srstate == "2") { lb_state.Text = "失效"; lb_state.ForeColor = System.Drawing.Color.Red; } if (srtype == "1") { lb_type.Text = "账号信息"; lb_type.ForeColor = System.Drawing.Color.Blue; } else if (srtype == "2") { lb_type.Text = "导入收货信息"; lb_type.ForeColor = System.Drawing.Color.Green; } else if (srtype == "3") { lb_type.Text = "生成收货信息"; lb_type.ForeColor = System.Drawing.Color.LawnGreen; } else if (srtype == "4") { lb_type.Text = "评价信息"; lb_type.ForeColor = System.Drawing.Color.LightBlue; } else if (srtype == "5") { lb_type.Text = "转换空包网格式"; lb_type.ForeColor = System.Drawing.Color.Crimson; } else if (srtype == "6") { lb_type.Text = "自定义转换格式"; lb_type.ForeColor = System.Drawing.Color.Crimson; } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string State = GridView1.DataKeys[e.Row.RowIndex].Values["shstate"].ToString(); string dianpu = GridView1.DataKeys[e.Row.RowIndex].Values["dpid"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; Label lbl_dianpu = e.Row.FindControl("lbl_dianpu") as Label; if (State == "1") { lb_state.Text = "未处理"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (State == "2") { lb_state.Text = "已投诉"; lb_state.ForeColor = System.Drawing.Color.Red; } else if (State == "3") { lb_state.Text = "已处理"; lb_state.ForeColor = System.Drawing.Color.Green; } IList <dianpu> list = BLL.dianpuManager.GetList(false); foreach (dianpu dp in list) { if (dp.dpid.ToString() == dianpu) { lbl_dianpu.Text = dp.dpname; lbl_dianpu.ForeColor = System.Drawing.Color.Green; //if (dp.dpremark.IndexOf("淘宝") > 0) //{ // lb_account.NavigateUrl = "http://www.taobao.com/webww/ww.php?ver=3&touid=" + lb_account.Text + "&siteid=cntaobao&status=1&charset=utf-8"; // lb_account.ForeColor = System.Drawing.Color.Blue; //} break; } } //判断是否是编辑状态 if (GridView1.EditIndex != e.Row.RowIndex) { HyperLink lb_account = e.Row.FindControl("lb_account") as HyperLink; lb_account.NavigateUrl = "http://www.taobao.com/webww/ww.php?ver=3&touid=" + lb_account.Text + "&siteid=cntaobao&status=1&charset=utf-8"; lb_account.ForeColor = System.Drawing.Color.Blue; } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string hstate = GridView1.DataKeys[e.Row.RowIndex].Values["hstate"].ToString(); string hfid = GridView1.DataKeys[e.Row.RowIndex].Values["hfid"].ToString(); string hemail = GridView1.DataKeys[e.Row.RowIndex].Values["hsendemail"] != null ? GridView1.DataKeys[e.Row.RowIndex].Values["hsendemail"].ToString():"2"; //string hemail = GridView1.DataKeys[e.Row.RowIndex].Values["hsendemail"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; LinkButton lb_email = e.Row.FindControl("lb_email") as LinkButton; Label lbl_type = e.Row.FindControl("lbl_type") as Label; if (hstate == "1") { lb_state.Text = "正常"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (hstate == "2") { lb_state.Text = "禁用"; lb_state.ForeColor = System.Drawing.Color.Red; } //lb_email.Text = hemail; if (hemail == "1") { lb_email.Text = "发送"; lb_email.ForeColor = System.Drawing.Color.Blue; } else { lb_email.Text = "不发送"; lb_email.ForeColor = System.Drawing.Color.Red; } foreach (huashu hs in BLL.huashuManager.GetList()) { if (hs.hid.ToString() == hfid) { lbl_type.Text = hs.htitle; lbl_type.ForeColor = System.Drawing.Color.Blue; break; } } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string State = GridView1.DataKeys[e.Row.RowIndex].Values["ckstate"].ToString(); string gtid = GridView1.DataKeys[e.Row.RowIndex].Values["gtid"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; Label lbl_goodstype = e.Row.FindControl("lbl_goodstype") as Label; if (State == "1") { lb_state.Text = "启用"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (State == "2") { lb_state.Text = "禁用"; lb_state.ForeColor = System.Drawing.Color.Red; } IList <yh_goodstype> list = BLL.yh_goodstypeManager.GetList(true); foreach (yh_goodstype g in list) { if (g.gtid.ToString() == gtid) { lbl_goodstype.Text = g.gtanme; lbl_goodstype.ForeColor = System.Drawing.Color.Green; break; } } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { //try //{ // string State = GridView1.DataKeys[e.Row.RowIndex].Values["dpstate"].ToString(); // LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; // if (State == "1") // { // lb_state.Text = "启用"; // lb_state.ForeColor = System.Drawing.Color.Blue; // } // else if (State == "2") // { // lb_state.Text = "禁用"; // lb_state.ForeColor = System.Drawing.Color.Red; // } //} //catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e) { //try //{ if (AJAXManager.GridView_ondblclick(e)) { try { string State = GridView3.DataKeys[e.Row.RowIndex].Values["fx_state"].ToString(); string dianpu = GridView3.DataKeys[e.Row.RowIndex].Values["dpid"].ToString(); string fxid = GridView3.DataKeys[e.Row.RowIndex].Values["fx_id"].ToString(); string price = GridView3.DataKeys[e.Row.RowIndex].Values["fx_num"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; Label lbl_dianpu = e.Row.FindControl("lbl_dianpu") as Label; if (State == "1") { lb_state.Text = "未返现"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (State == "2") { lb_state.Text = "已处理"; lb_state.ForeColor = System.Drawing.Color.Green; } else if (State == "3") { lb_state.Text = "有问题"; lb_state.ForeColor = System.Drawing.Color.Red; } IList <dianpu> list = BLL.dianpuManager.GetList(false); foreach (dianpu dp in list) { if (dp.dpid.ToString() == dianpu) { lbl_dianpu.Text = dp.dpname; lbl_dianpu.ForeColor = System.Drawing.Color.Green; //if (dp.dpremark.IndexOf("淘宝") > 0) //{ // lb_account.NavigateUrl = "http://www.taobao.com/webww/ww.php?ver=3&touid=" + lb_account.Text + "&siteid=cntaobao&status=1&charset=utf-8"; // lb_account.ForeColor = System.Drawing.Color.Blue; //} break; } } //判断是否是编辑状态 if (GridView3.EditIndex != e.Row.RowIndex) { //Label lbl_zhifubao = e.Row.FindControl("lbl_zhifubao") as Label; LinkButton lb_zhifubao = e.Row.FindControl("lb_zhifubao") as LinkButton; HyperLink lb_account = e.Row.FindControl("lb_account") as HyperLink; lb_account.NavigateUrl = "http://www.taobao.com/webww/ww.php?ver=3&touid=" + lb_account.Text + "&siteid=cntaobao&status=1&charset=utf-8"; lb_account.ForeColor = System.Drawing.Color.Blue; //支付宝打款 try { object obj = GridView3.DataKeys[e.Row.RowIndex].Values["fx_zhifubao"]; if (obj != null) { string zhifubao = obj.ToString(); if (!string.IsNullOrEmpty(zhifubao) && !string.IsNullOrEmpty(price)) { //判断返现次数 int n = BLL.fanxianManager.SearchNum(zhifubao, "", 0, new DateTime(), new DateTime(), new DateTime(), new DateTime()); lb_zhifubao.ForeColor = System.Drawing.Color.Red; if (n > 1) { lb_zhifubao.ForeColor = System.Drawing.Color.Silver; lb_zhifubao.Font.Bold = true; lb_zhifubao.ToolTip = "该支付宝已经返现" + n.ToString() + "次,请留意!"; } //添加返现功能 string js = n > 1 ? "alert('该用户已经返现" + n.ToString() + "次,确定要继续返现么?');to_zhifubao('" + zhifubao + "','" + price + "');" : "to_zhifubao('" + zhifubao + "','" + price + "');"; lb_zhifubao.Attributes["onclick"] = js; } } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e) { //try //{ if (AJAXManager.GridView_ondblclick(e)) { try { string State = GridView2.DataKeys[e.Row.RowIndex].Values["bgstate"].ToString(); string dpid = GridView2.DataKeys[e.Row.RowIndex].Values["dpid"].ToString(); string bgid = GridView2.DataKeys[e.Row.RowIndex].Values["bgid"].ToString(); string hdid = GridView2.DataKeys[e.Row.RowIndex].Values["hdid"].ToString(); string bgkey = GridView2.DataKeys[e.Row.RowIndex].Values["bgkey"].ToString(); string opid = GridView2.DataKeys[e.Row.RowIndex].Values["opid"].ToString(); string bgupdate = GridView2.DataKeys[e.Row.RowIndex].Values["bgupdate"].ToString(); DateTime up_date = new DateTime(); DateTime.TryParse(bgupdate, out up_date); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; LinkButton lb_key = e.Row.FindControl("lb_key") as LinkButton; Label lbl_dianpu = e.Row.FindControl("lbl_dianpu") as Label; Label lbl_order = e.Row.FindControl("lbl_order") as Label; Label lbl_huodong = e.Row.FindControl("lbl_huodong") as Label; //补单 int temp_order = basic_order_planManager.GetNumInPlan(up_date, Convert.ToInt32(opid)); int _order_count = BLL.basic_order_recordManager.SearchNum("", Convert.ToInt32(bgid), 0, 0, "", "", DateTime.Now, DateTime.Now); int res_count = temp_order - _order_count; if (res_count > 0) { lbl_order.Text = "需补 " + (temp_order - _order_count).ToString() + " 单"; lbl_order.ForeColor = System.Drawing.Color.Red; lbl_order.Font.Bold = true; } else { lbl_order.Text = "无"; lbl_order.ForeColor = System.Drawing.Color.Black; } //活动提示 basic_huodong hd = basic_huodongManager.SearchByID(Convert.ToInt32(hdid)); int temp_huodong = Manager.DateDiff_GetInt(DateTime.Now, up_date) + 1; if (temp_huodong == hd.hdone || temp_huodong == hd.hdtwo) { lbl_huodong.Text = "今日" + hd.hddate1.ToString("HH:mm") + "报名"; lbl_huodong.ForeColor = System.Drawing.Color.Red; lbl_huodong.Font.Bold = true; } else { lbl_huodong.Text = "无"; lbl_huodong.ForeColor = System.Drawing.Color.Black; } //状态 if (State == "1") { lb_state.Text = "启用"; lb_state.ForeColor = System.Drawing.Color.Red; //lb_state.Font.Bold = true; } else if (State == "2") { lb_state.Text = "禁用"; lb_state.ForeColor = System.Drawing.Color.Blue; } //是否重点 if (bgkey == "1") { lb_key.Text = "是"; lb_key.ForeColor = System.Drawing.Color.Red; lb_key.Font.Bold = true; } else if (bgkey == "2") { lb_key.Text = "否"; lb_key.ForeColor = System.Drawing.Color.Blue; } //店铺 dianpu dp = BLL.dianpuManager.GetInList(dpid); if (dp != null) { lbl_dianpu.Text = dp.dpname; lbl_dianpu.ForeColor = System.Drawing.Color.Green; // lb_account.NavigateUrl = "http://www.taobao.com/webww/ww.php?ver=3&touid=" + lb_account.Text + "&siteid=cntaobao&status=1&charset=utf-8"; } //判断是否是编辑状态 if (GridView2.EditIndex != e.Row.RowIndex) { //LinkButton lb_zhifubao = e.Row.FindControl("lb_zhifubao") as LinkButton; //HyperLink lb_account = e.Row.FindControl("lb_account") as HyperLink; //lb_account.NavigateUrl = "http://www.taobao.com/webww/ww.php?ver=3&touid=" + lb_account.Text + "&siteid=cntaobao&status=1&charset=utf-8"; //lb_account.ForeColor = System.Drawing.Color.Blue; } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { //try //{ if (AJAXManager.GridView_ondblclick(e)) { object obj_gimg = GridView1.DataKeys[e.Row.RowIndex].Values["gimg"]; object obj_gimg2 = GridView1.DataKeys[e.Row.RowIndex].Values["gimg2"]; object obj_gurl = GridView1.DataKeys[e.Row.RowIndex].Values["gurl"]; object obj_gurl2 = GridView1.DataKeys[e.Row.RowIndex].Values["gurl2"]; object obj_gprice1 = GridView1.DataKeys[e.Row.RowIndex].Values["gprice1"]; object obj_gprice2 = GridView1.DataKeys[e.Row.RowIndex].Values["gprice2"]; object obj_gurl_yuan = GridView1.DataKeys[e.Row.RowIndex].Values["gurl_yuan"]; string gimg = obj_gimg == null ? "" : obj_gimg.ToString(); string gimg2 = obj_gimg2 == null ? "" : obj_gimg2.ToString(); string gurl = obj_gurl == null ? "" : obj_gurl.ToString(); string gurl2 = obj_gurl2 == null ? "" : obj_gurl2.ToString(); string gprice1 = obj_gprice1 == null ? "" : obj_gprice1.ToString(); string gprice2 = obj_gprice2 == null ? "" : obj_gprice2.ToString(); string gurl_yuan = obj_gurl_yuan == null ? "" : obj_gurl_yuan.ToString(); HyperLink hl_state_img_tb = e.Row.FindControl("hl_state_img_tb") as HyperLink; HyperLink hl_state_img_mgj = e.Row.FindControl("hl_state_img_mgj") as HyperLink; HyperLink hl_price_tb = e.Row.FindControl("hl_price_tb") as HyperLink; HyperLink hl_price_mgj = e.Row.FindControl("hl_price_mgj") as HyperLink; HyperLink hl_url_yuan = e.Row.FindControl("hl_url_yuan") as HyperLink; if (!string.IsNullOrEmpty(gimg)) { hl_state_img_tb.Text = "有图"; hl_state_img_tb.NavigateUrl = "~/OA/upload/" + gimg; hl_state_img_tb.ForeColor = System.Drawing.Color.Blue; } if (!string.IsNullOrEmpty(gimg2)) { hl_state_img_mgj.Text = "有图"; hl_state_img_mgj.NavigateUrl = "~/OA/upload/" + gimg2; hl_state_img_mgj.ForeColor = System.Drawing.Color.Blue; } object obj_gstate1 = GridView1.DataKeys[e.Row.RowIndex].Values["gstate1"]; object obj_gstate2 = GridView1.DataKeys[e.Row.RowIndex].Values["gstate2"]; object obj_gstate3 = GridView1.DataKeys[e.Row.RowIndex].Values["gstate3"]; object obj_important = GridView1.DataKeys[e.Row.RowIndex].Values["g_standby1"]; string gstate1 = obj_gstate1 == null ? "" : obj_gstate1.ToString(); string gstate2 = obj_gstate2 == null ? "" : obj_gstate2.ToString(); string gstate3 = obj_gstate3 == null ? "" : obj_gstate3.ToString(); string gstate_important = obj_important == null ? "" : obj_important.ToString(); LinkButton lb_state_up = e.Row.FindControl("lb_state_up") as LinkButton; LinkButton lb_state_img = e.Row.FindControl("lb_state_img") as LinkButton; LinkButton lb_state_yh = e.Row.FindControl("lb_state_yh") as LinkButton; LinkButton lb_state_important = e.Row.FindControl("lb_state_important") as LinkButton; //判断是否是编辑状态 if (GridView1.EditIndex != e.Row.RowIndex) { hl_price_tb.Text = string.IsNullOrEmpty(gprice1) ? "暂无" : gprice1; if (!string.IsNullOrEmpty(gurl)) { hl_price_tb.NavigateUrl = Manager.AddString_Http(gurl); hl_price_tb.ForeColor = System.Drawing.Color.Blue; } hl_price_mgj.Text = string.IsNullOrEmpty(gprice2) ? "暂无" : gprice2; if (!string.IsNullOrEmpty(gurl2)) { hl_price_mgj.NavigateUrl = Manager.AddString_Http(gurl2); hl_price_mgj.ForeColor = System.Drawing.Color.Blue; } hl_url_yuan.Text = string.IsNullOrEmpty(gurl_yuan) ? "暂无" : "点击可查看"; if (!string.IsNullOrEmpty(gurl_yuan)) { hl_url_yuan.NavigateUrl = Manager.AddString_Http(gurl_yuan); hl_url_yuan.ForeColor = System.Drawing.Color.Blue; } } try { if (gstate1 == "1") { lb_state_img.Text = "未上传"; lb_state_img.ForeColor = System.Drawing.Color.Red; } else if (gstate1 == "2") { lb_state_img.Text = "已上传"; lb_state_img.ForeColor = System.Drawing.Color.Green; } if (gstate2 == "1") { lb_state_up.Text = "未上架"; lb_state_up.ForeColor = System.Drawing.Color.Red; } else if (gstate2 == "2") { lb_state_up.Text = "已上架"; lb_state_up.ForeColor = System.Drawing.Color.Green; } if (gstate3 == "1") { lb_state_yh.Text = "未优化"; lb_state_yh.ForeColor = System.Drawing.Color.Red; } else if (gstate3 == "2") { lb_state_yh.Text = "已优化"; lb_state_yh.ForeColor = System.Drawing.Color.Green; } if (gstate_important == "2") { lb_state_important.Text = "是"; lb_state_important.ForeColor = System.Drawing.Color.Red; } else { lb_state_important.Text = "否"; lb_state_important.ForeColor = System.Drawing.Color.Green; } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } //} //catch (Exception ex) //{ // Common.ErrorLog.WriteEntry(ex); //} }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (AJAXManager.GridView_ondblclick(e)) { try { string State = GridView1.DataKeys[e.Row.RowIndex].Values["orprepare1"].ToString(); string dianpu = GridView1.DataKeys[e.Row.RowIndex].Values["dpid"].ToString(); //string orid = GridView1.DataKeys[e.Row.RowIndex].Values["orid"].ToString(); //string bgid = GridView1.DataKeys[e.Row.RowIndex].Values["bgid"].ToString(); string ormaijiaxiu = GridView1.DataKeys[e.Row.RowIndex].Values["ormaijiaxiu"].ToString(); //string orqq = GridView1.DataKeys[e.Row.RowIndex].Values["orqq"].ToString(); //string orwangwang = GridView1.DataKeys[e.Row.RowIndex].Values["orwangwang"].ToString(); LinkButton lb_state = e.Row.FindControl("lb_state") as LinkButton; LinkButton lb_maijiaxiu = e.Row.FindControl("lb_maijiaxiu") as LinkButton; Label lbl_dianpu = e.Row.FindControl("lbl_dianpu") as Label; //状态 if (State == "1") { lb_state.Text = "已评价"; lb_state.ForeColor = System.Drawing.Color.Blue; } else if (State == "2") { lb_state.Text = "未评价"; lb_state.ForeColor = System.Drawing.Color.Red; lb_state.Font.Bold = true; } //买家秀 if (ormaijiaxiu == "1") { lb_maijiaxiu.Text = "是"; lb_maijiaxiu.ForeColor = System.Drawing.Color.Red; lb_maijiaxiu.Font.Bold = true; } else if (ormaijiaxiu == "2") { lb_maijiaxiu.Text = "否"; lb_maijiaxiu.ForeColor = System.Drawing.Color.Blue; } //店铺 dianpu dp = dianpuManager.GetInList(dianpu); if (dp != null) { lbl_dianpu.Text = dp.dpname; lbl_dianpu.ForeColor = System.Drawing.Color.Green; } //判断是否是编辑状态 if (GridView1.EditIndex != e.Row.RowIndex) { HyperLink lb_wangwang = e.Row.FindControl("lb_wangwang") as HyperLink; lb_wangwang.NavigateUrl = "http://www.taobao.com/webww/ww.php?ver=3&touid=" + lb_wangwang.Text + "&siteid=cntaobao&status=1&charset=utf-8"; lb_wangwang.ForeColor = System.Drawing.Color.Blue; HyperLink lb_qq = e.Row.FindControl("lb_qq") as HyperLink; lb_qq.NavigateUrl = "tencent://message/?uin=" + lb_qq.Text + "&Site=我的网站&Menu=yes"; lb_qq.ForeColor = System.Drawing.Color.Blue; } } catch (Exception ex) { Common.ErrorLog.WriteEntry(ex); } } }