示例#1
0
        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);
        }
示例#2
0
 public bool Update(Chain.Model.RechargeRule model)
 {
     return(this.dal.Update(model));
 }
示例#3
0
 public int Add(Chain.Model.RechargeRule model)
 {
     return(this.dal.Add(model));
 }