Esempio n. 1
0
        public static void LoadAccountGroups(this DropDownList ddl, int CompanyId)
        {
            DataTable dt = AccountGroup.GetAccountGroups(CompanyId);

            ddl.Items.Clear();
            ddl.Items.Add(new ListItem("--select--", "0"));
            if (dt != null)
            {
                foreach (DataRow item in dt.Rows)
                {
                    ddl.Items.Add(new ListItem(item["name"].ToString(), item["id"].ToString()));
                }
            }
        }
Esempio n. 2
0
 public HttpResponseMessage GetGroups([FromBody] int CompanyId)
 {
     return(Request.CreateResponse(HttpStatusCode.OK, AccountGroup.GetAccountGroups(CompanyId)));
 }