internal static int SetBandInfo(BandInfo info) { if (info == null) return -1; SafeProcedure.ExecuteNonQuery( Database.GetDatabase(D4DDefine.DBInstanceName), "dbo.BandInfo_Set", delegate(IParameterSet parameters) { parameters.AddWithValue("@BandId", info.BandId); parameters.AddWithValue("@BandName", info.BandName); parameters.AddWithValue("@Info1", info.Info1); parameters.AddWithValue("@Info2", info.Info2); parameters.AddWithValue("@Info3", info.Info3); parameters.AddWithValue("@Remark", info.Remark); parameters.AddWithValue("@RetVal", DBNull.Value, ParameterDirectionWrap.ReturnValue); }, delegate(IParameterSet outputParameters) { info.BandId = Convert.ToInt32(outputParameters.GetValue("@RetVal")); }); return info.BandId; }
internal static void MapBandInfoList(IRecord record, List<BandInfo> list) { BandInfo m = new BandInfo(); m.BandId = record.GetInt32OrDefault(0, 0); m.BandName = record.GetStringOrEmpty(1); m.Info1 = record.GetStringOrEmpty(2); m.Info2 = record.GetStringOrEmpty(3); m.Info3 = record.GetStringOrEmpty(4); m.Remark = record.GetStringOrEmpty(5); list.Add(m); }
public List<BandInfo> GetBandInfoList(bool needCompany) { List<BandInfo> list = BandInfoDao.GetAllBandInfo(0); if (list == null) list = new List<BandInfo>(); if (needCompany) { BandInfo bInfo = new BandInfo(); bInfo.BandId = 0; bInfo.BandName = "��˾"; list.Add(bInfo); } return list; }
public int SetBandInfo(BandInfo info) { return BandInfoDao.SetBandInfo(info); }