private string filluser(int CounterId) { counter_Prop counterProp = new counter_Prop(); counterProp.Counterid = CounterId; report_bal reportbal = new report_bal(); DataTable dt = reportbal.fillUser(counterProp); StringBuilder sb = new StringBuilder(); if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null) { return("0#" + reportbal.ErrMessage + "$"); } else { if (dt.Rows.Count > 0) { StringBuilder sbtxt = new StringBuilder(); for (int i = 0; i < dt.Rows.Count; i++) { sbtxt.Append(dt.Rows[i]["UserID"].ToString() + "#" + dt.Rows[i]["UserName"].ToString() + "$"); } return(sbtxt.ToString()); } else { return("0#No Data Found$"); } } return(sb.ToString()); }