Ejemplo n.º 1
0
    public List <usertypeManager> BindUserType()
    {
        usertypeManager        objuser = new usertypeManager();
        List <usertypeManager> lmp     = new List <usertypeManager>();
        DataTable dt = new DataTable();

        try
        {
            dt = objuser.GetAllUserType();
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    usertypeManager PMS = new usertypeManager();
                    PMS.adminTypeId = Convert.ToInt32(dr["adminTypeId"].ToString());
                    PMS.typeName    = dr["typeName"].ToString();
                    lmp.Add(PMS);
                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }

        return(lmp);
    }
Ejemplo n.º 2
0
    public void BindUserType()
    {
        usertypeManager objuser = new usertypeManager();

        DataTable dt = new DataTable();

        try
        {
            dt = objuser.GetAllUserType();
            UserTypelist.DataSource = dt;
            UserTypelist.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
        }
    }