コード例 #1
0
 public bool Initialize(object obj, int refId, int userId)
 {
     wpp = (WFIEditarStatusWF)obj;
     GridView1.DataSource = Formss.ListarForms(userId);
     GridView1.DataBind();
     return(true);
 }
コード例 #2
0
    public static List <Formss> ListarForms(int userId)
    {
        List <Formss> lstForms = new List <Formss>();
        SqlDataReader dr       = SqlHelper.ExecuteReader(ConfigurationManager.AppSettings[Global.CfgKeyConnString], Queries.WF_LlenarGridBandeja, userId);

        //string[] Fechas;
        while (dr.Read())
        {
            Formss Form = new Formss();

            Form._solicitudId   = dr.GetInt64(0);
            Form._workFlowId    = dr.GetInt32(1);
            Form._asunto        = dr.GetString(2);
            Form._referenciaId  = dr.GetString(3);
            Form._responsableId = dr.GetInt32(4);
            Form._responsable   = dr.GetString(5);
            Form._idStatus      = dr.GetString(7);
            Form._fecha         = dr.GetDateTime(8);


            lstForms.Add(Form);
        }

        return(lstForms);
    }
コード例 #3
0
        public void Status(string status, int userId)
        {
            List <Formss> lsta = Formss.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++;
             * }
             */
        }