protected void Orggrdvw_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        Organization_mst orgobj = new Organization_mst();
        string           name, desc, id;
        int orgid = 0;

        name = ((TextBox)Orggrdvw.Rows[e.RowIndex].Cells[1].Controls[0]).Text;
        desc = ((TextBox)Orggrdvw.Rows[e.RowIndex].Cells[2].Controls[0]).Text;
        id   = Convert.ToString(Orggrdvw.Rows[e.RowIndex].Cells[0].Text);
        if (name != "")
        {
            orgid              = Convert.ToInt32(id);
            orgobj.Orgid       = orgid;
            orgobj.Orgname     = name;
            orgobj.Description = desc;
            orgobj.Update();
            Orggrdvw.EditIndex = -1;
            BindGrid();
            lblErrorMsg.Text = Resources.MessageResource.errupdate.ToString();
        }
        else
        {
            lblErrorMsg.Text = "Organization Name should not be empty";
        }
    }
 protected void Orggrdvw_RowUpdating(object sender, GridViewUpdateEventArgs e)
 {
     Organization_mst orgobj = new Organization_mst();
       string name,desc,id;
       int orgid = 0;
       name = ((TextBox)Orggrdvw.Rows[e.RowIndex].Cells[1].Controls[0]).Text;
       desc = ((TextBox)Orggrdvw.Rows[e.RowIndex].Cells[2].Controls[0]).Text;
       id = Convert.ToString(Orggrdvw.Rows[e.RowIndex].Cells[0].Text);
       if (name != "")
       {
           orgid = Convert.ToInt16(id);
           orgobj.Orgid = orgid;
           orgobj.Orgname = name;
           orgobj.Description = desc;
           orgobj.Update();
           Orggrdvw.EditIndex = -1;
           BindGrid();
           lblErrorMsg.Text = Resources.MessageResource.errupdate.ToString();
       }
       else
       {
           lblErrorMsg.Text = "Organization Name should not be empty";
       }
 }