public static List <AmountTransferBy> bindUserName() { List <AmountTransferBy> list = new List <AmountTransferBy>(); AmountTransferBy obj = new AmountTransferBy(0, ""); DataTable dt = new DataTable(); dt = obj.bindData(); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { obj = new AmountTransferBy(Convert.ToInt32(dt.Rows[i]["Id"].ToString()), dt.Rows[i]["User_Name"].ToString(), Convert.ToInt32(dt.Rows[i]["MinimumValue"].ToString()), Convert.ToInt32(dt.Rows[i]["MaximumValue"].ToString()), Convert.ToInt32(dt.Rows[i]["User_id"].ToString())); list.Add(obj); } } return(list); }
public void bindUserName() { AmountTransferBy obj = new AmountTransferBy(0, ""); DataTable dt = new DataTable(); try { dt = obj.bindData(); Lbl_reccnt.Text = dt.Rows.Count.ToString(); } catch (Exception ex) { Lbl_reccnt.Text = ex.Message; Lbl_reccnt.Text += ">>>>>>>" + ex.InnerException; } }