Beispiel #1
0
    public void approveRequisition(string[] reidandheid)
    {
        int rid = Convert.ToInt32(reidandheid[0]);
        int hid = Convert.ToInt32(reidandheid[1]);

        dhmanager.approve(rid, hid);
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            List <int> ids = new List <int>();

            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                String val = GridView1.Rows[i].Cells[0].Text;
                if (!String.IsNullOrEmpty(val))
                {
                    ids.Add(Convert.ToInt32(val));
                }
            }
            foreach (int id in ids)
            {
                d.approve(id, headcode);
            }
        }
        catch (Exception e1)
        {
            GridView1.DataSource = null;
            GridView1.DataBind();
            Label1.Text = "Approved Successfully";
        }
    }