public List <Chain.Model.RechargeRule> DataTableToList(DataTable dt) { List <Chain.Model.RechargeRule> modelList = new List <Chain.Model.RechargeRule>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { for (int i = 0; i < rowsCount; i++) { Chain.Model.RechargeRule model = new Chain.Model.RechargeRule(); if (dt.Rows[i]["RuleID"] != null && dt.Rows[i]["RuleID"].ToString() != "") { model.RuleID = int.Parse(dt.Rows[i]["RuleID"].ToString()); } modelList.Add(model); } } return(modelList); }
public bool Update(Chain.Model.RechargeRule model) { return(this.dal.Update(model)); }
public int Add(Chain.Model.RechargeRule model) { return(this.dal.Add(model)); }