public void insert(CInsurance p_data) { string l_Sql = ""; l_Sql += "INSERT INTO [KG].[dbo].[tbInsurance](f_id,f_name) VALUES ("; l_Sql += " '" + p_data.f_id代碼 + "'"; l_Sql += ", '" + p_data.f_f_name名稱 + "'"; l_Sql += ")"; ivContext.資料管理員.excuteSqlNonquery(l_Sql); }
private CInsurance[] queryBySql(string p_sql) { DataView l_dv = ivContext.資料管理員.getDataViewBySql(p_sql); CInsurance[] l_datas = new CInsurance[l_dv.Count]; if (l_dv != null) { for (int i = 0; i < l_datas.Length; i++) { l_datas[i] = createCInsurance(); l_datas[i].f_id代碼 = l_dv[i]["f_id"].ToString(); l_datas[i].f_f_name名稱 = l_dv[i]["f_name"].ToString(); } return(l_datas); } return(null); }