public static void DeleteData(int Id) { AmountTransferBy obj = new AmountTransferBy(); obj.Id = Id; int Result = obj.DeleteData(obj); }
public static void SaveData(double minValue, double maxValue, int transferBy) { AmountTransferBy obj = new AmountTransferBy(); obj.MinValue = minValue; obj.MaxValue = maxValue; obj.TransferBy = transferBy; int Result = obj.SaveData(obj); }
public static void UpdateData(double minValue, double maxValue, int transferBy, int transferId) { AmountTransferBy obj = new AmountTransferBy(); obj.MinValue = minValue; obj.MaxValue = maxValue; obj.TransferBy = transferBy; obj.Id = transferId; int Result = obj.UpdateData(obj); }
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; } }
public static List <AmountTransferBy> getAccountList() { List <AmountTransferBy> list = new List <AmountTransferBy>(); AmountTransferBy obj = new AmountTransferBy(0, ""); DataTable dt = new DataTable(); dt = obj.getAccountUsers(); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { obj = new AmountTransferBy(Convert.ToInt32(dt.Rows[i]["User_id"].ToString()), dt.Rows[i]["User_Name"].ToString()); list.Add(obj); } } return(list); }
public static string fetchAccountList() { StringBuilder json = new StringBuilder(); List <AmountTransferBy> list = new List <AmountTransferBy>(); AmountTransferBy obj = new AmountTransferBy(0, ""); DataTable dt = new DataTable(); dt = obj.getAccountUsers(); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { obj = new AmountTransferBy(Convert.ToInt32(dt.Rows[i]["User_id"].ToString()), dt.Rows[i]["User_Name"].ToString()); list.Add(obj); } } //string ss= list.ToString(); System.Web.Script.Serialization.JavaScriptSerializer jsonSerialiser = new System.Web.Script.Serialization.JavaScriptSerializer(); var jsondata = jsonSerialiser.Serialize(list); return(jsondata.ToString()); }