public bool Initialize(object obj, int refId, int userId) { wpp = (WFIEditarStatusWF)obj; GridView1.DataSource = WFForms.ListarForms(userId); GridView1.DataBind(); return(true); }
public void Status(string status, int userId) { List <WFForms> lsta = WFForms.ListarForms(userId); if (status != "Todos") { lsta = lsta.FindAll(c => c.IdStatus == status); GridView1.DataSource = lsta; GridView1.DataBind(); } else { GridView1.DataSource = lsta; GridView1.DataBind(); } /* * while (i < GridView1.Rows.Count) * { * * //TextBox MM = (TextBox)GridView1.Rows[i].FindControl("txtMoneyMarket"); * Label LbStat = (Label)GridView1.Rows[i].FindControl("LbStatus"); * Label LbRespon = (Label)GridView1.Rows[i].FindControl("LbResponsable"); * Label LbAsnto = (Label)GridView1.Rows[i].FindControl("LbAsunto"); * Label LbDate = (Label)GridView1.Rows[i].FindControl("LbFecha"); * * if (LbStat.Text == "Pendiente") * { * LbStat.Font.Bold = true; * LbRespon.Font.Bold = true; * LbAsnto.Font.Bold = true; * LbDate.Font.Bold = true; * // GridView1.RowStyle.Font.Bold = true; * * } * else if (LbStat.Text == "Aprobado") * { * GridView1.RowStyle.BackColor = System.Drawing.ColorTranslator.FromHtml(_azulPastel); * } * else if (LbStat.Text == "Rechazado") * { * GridView1.RowStyle.BackColor = System.Drawing.ColorTranslator.FromHtml(_rojoPastel); * } * * i++; * } */ }