public string[] GetEmployee(string prefixText, int count) { MatterView BEL = new MatterView(); DataTable dt = BEL.SelectLikeDataAssignedLawyer(prefixText.ToUpper()); List<string> txtItems = new List<string>(); String dbValues; String dbValues1; foreach (DataRow row in dt.Rows) { //String From DataBase(dbValues) dbValues1 = row["Employee_Id"].ToString().ToUpper(); dbValues = row["UserName"].ToString().ToUpper(); dbValues = dbValues.ToUpper(); txtItems.Add(string.Format("{0} {1}", dbValues1, dbValues)); // txtItems.Add(dbValues,); if (txtItems.Count > count) { return txtItems.ToArray(); } } return txtItems.ToArray(); }
public string[] GetMatterType(string prefixText, int count) { MatterView BEL = new MatterView(); DataTable dt = BEL.SelectLikeDataMatterType(prefixText.ToUpper()); List<string> txtItems = new List<string>(); String dbValues; foreach (DataRow row in dt.Rows) { //String From DataBase(dbValues) dbValues = row["Matter_Type_Desc"].ToString().ToUpper(); dbValues = dbValues.ToUpper(); txtItems.Add(dbValues); if (txtItems.Count > count) { return txtItems.ToArray(); } } return txtItems.ToArray(); }