/// <summary> /// 插入明细 /// </summary> /// <param name="bgid"></param> /// <param name="gz"></param> /// <param name="zrs"></param> /// <param name="jkycrs"></param> /// <param name="zyycrs"></param> /// <param name="sqls"></param> public void InsertSzTjbgMx(SzTjbgMx mx, List <string> sqls) { StringBuilder sql = new StringBuilder("insert into sz_tjbg_mx(bgid,gz,zrs,jkycrs,whys,zyycrs) values('"); sql.Append(mx.Bgid + "','"); sql.Append(mx.Gz + "','"); sql.Append(mx.Zrs + "','"); sql.Append(mx.Jkycrs + "','"); sql.Append(mx.Whys + "','"); sql.Append(mx.Zyycrs + "')"); sqls.Add(sql.ToString()); }
List<SzTjbgMx> GetMxes(string bgid) { List<SzTjbgMx> mxes = new List<SzTjbgMx>(); SzTjbgMx mx; for (int i = 0; i < dgvTjhz.Rows.Count; i++) { mx = new SzTjbgMx(); mx.Bgid = bgid; mx.Gz = dgvTjhz.Rows[i].Cells["gz"].Value.ToString().Trim(); mx.Whys = dgvTjhz.Rows[i].Cells["whys"].Value.ToString().Trim(); mx.Jkycrs = dgvTjhz.Rows[i].Cells["ycrs"].Value.ToString().Trim(); mx.Zrs = dgvTjhz.Rows[i].Cells["rs"].Value.ToString().Trim(); mx.Zyycrs = dgvTjhz.Rows[i].Cells["zyjkyc"].Value.ToString().Trim(); mxes.Add(mx); } return mxes; }