public override SqlParameter[] GetParameters() { M_FtpConfig model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.FtpServer; sp[2].Value = model.FtpPort; sp[3].Value = model.FtpUsername; sp[4].Value = model.FtpPassword; sp[5].Value = model.OutTime; sp[6].Value = model.SavePath; sp[7].Value = model.Alias; sp[8].Value = model.Url; return(sp); }
public static M_FtpConfig GetModelFromReader(DbDataReader rdr) { M_FtpConfig model = new M_FtpConfig(); model.ID = Convert.ToInt32(rdr["ID"]); model.FtpServer = rdr["FtpServer"].ToString(); model.FtpPort = rdr["FtpPort"].ToString(); model.FtpUsername = rdr["FtpUsername"].ToString(); model.FtpPassword = rdr["FtpPassword"].ToString(); model.OutTime = rdr["OutTime"].ToString(); model.SavePath = rdr["SavePath"].ToString(); model.Alias = rdr["Alias"].ToString(); model.Url = rdr["Url"].ToString(); rdr.Close(); rdr.Dispose(); return(model); }