Beispiel #1
0
        public JsonResult GetAccountGroup(string acctname)
        {
            //clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable dt;

            dt = oSubmit.GetAccountGroup(acctname, Session["CompCode"].ToString());
            var result = new List <KeyValuePair <string, string> >();

            foreach (DataRow dr in dt.Rows)
            {
                result.Add(new KeyValuePair <string, string>(dr["_Code"].ToString(), dr["_Name"].ToString()));
            }
            var result3 = result.Where(s => s.Value.ToLower().Contains(acctname.ToLower())).Select(w => w).ToList();

            return(Json(result3, JsonRequestBehavior.AllowGet));
        }