public M_Hits GetModelFromReader(DbDataReader rdr) { M_Hits model = new M_Hits(); model.ID = Convert.ToInt32(rdr["id"]); model.GID = ConvertToInt(rdr["GID"]); model.UID = ConvertToInt(rdr["Uid"]); model.UpdateTime = ConvertToDate(rdr["UpdateTime"]); model.IP = ConverToStr(rdr["Ip"]); model.Status = ConvertToInt(rdr["status"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_Hits model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.GID; sp[2].Value = model.UID; sp[3].Value = model.UpdateTime; sp[4].Value = model.IP; sp[5].Value = model.Status; return(sp); }