/// <summary> /// 增加一条数据 /// </summary> public long Add(lgk.Model.tb_BonusPoly model) { return(dal.Add(model)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(lgk.Model.tb_BonusPoly model) { return(dal.Update(model)); }
/// <summary> /// 获得数据列表 /// </summary> public List <lgk.Model.tb_BonusPoly> DataTableToList(DataTable dt) { List <lgk.Model.tb_BonusPoly> modelList = new List <lgk.Model.tb_BonusPoly>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { lgk.Model.tb_BonusPoly model; for (int n = 0; n < rowsCount; n++) { model = new lgk.Model.tb_BonusPoly(); if (dt.Rows[n]["ID"].ToString() != "") { model.ID = long.Parse(dt.Rows[n]["ID"].ToString()); } if (dt.Rows[n]["SettleTime"].ToString() != "") { model.SettleTime = DateTime.Parse(dt.Rows[n]["SettleTime"].ToString()); } if (dt.Rows[n]["TaskCompletedFlag"].ToString() != "") { model.TaskCompletedFlag = int.Parse(dt.Rows[n]["TaskCompletedFlag"].ToString()); } if (dt.Rows[n]["TaskCompletedTime"].ToString() != "") { model.TaskCompletedTime = DateTime.Parse(dt.Rows[n]["TaskCompletedTime"].ToString()); } if (dt.Rows[n]["UserID"].ToString() != "") { model.UserID = long.Parse(dt.Rows[n]["UserID"].ToString()); } if (dt.Rows[n]["InvestOrderID"].ToString() != "") { model.InvestOrderID = long.Parse(dt.Rows[n]["InvestOrderID"].ToString()); } if (dt.Rows[n]["Bonus"].ToString() != "") { model.Bonus = decimal.Parse(dt.Rows[n]["Bonus"].ToString()); } if (dt.Rows[n]["ShareDay"].ToString() != "") { model.ShareDay = int.Parse(dt.Rows[n]["ShareDay"].ToString()); } if (dt.Rows[n]["ShareDate"].ToString() != "") { model.ShareDate = DateTime.Parse(dt.Rows[n]["ShareDate"].ToString()); } model.ShowDate = dt.Rows[n]["ShowDate"].ToString(); if (dt.Rows[n]["Flag"].ToString() != "") { model.Flag = int.Parse(dt.Rows[n]["Flag"].ToString()); } if (dt.Rows[n]["TaskBonus"].ToString() != "") { model.TaskBonus = decimal.Parse(dt.Rows[n]["TaskBonus"].ToString()); } modelList.Add(model); } } return(modelList); }