//method to create contracts public bool
Insert_ContractRecords(string contractID, string empName, SqlDateTime startDate,
SqlDateTime endDate, float amount, string vendorbrn, string name, string
products, string rfpRef, string projectTitle, string alert) { SqlCommand
cmd_ContractList = new SqlCommand();
cmd_ContractList.CommandText =
"[VRM].[INSERT_ContractRecords]"; cmd_ContractList.CommandType =
CommandType.StoredProcedure; cmd_ContractList.Parameters.Clear();
SqlParameter
sqlParaContractID = new SqlParameter("@contractID", SqlDbType.VarChar,
10);//ContractID sqlParaContractID.Value =
contractID; cmd_ContractList.Parameters.Add(sqlParaContractID);
SqlParameter
sqlParaEmpName = new SqlParameter("@empName", SqlDbType.VarChar, 140);//Owner
Name aka Employee Name sqlParaEmpName.Value =
formatWildCard(empName); cmd_ContractList.Parameters.Add(sqlParaEmpName);
SqlParameter
sqlParaStartDate = new SqlParameter("@startDate", SqlDbType.DateTime);
//Contract Start DATE sqlParaStartDate.Value =
startDate; cmd_ContractList.Parameters.Add(sqlParaStartDate);
SqlParameter
sqlParaEndDate = new SqlParameter("@endDate", SqlDbType.DateTime); //Contract
End date sqlParaEndDate.Value =
endDate; cmd_ContractList.Parameters.Add(sqlParaEndDate);
SqlParameter
sqlParaAmount = new SqlParameter("@amount", SqlDbType.Float);
//amount sqlParaAmount.Value =
amount; cmd_ContractList.Parameters.Add(sqlParaAmount);
SqlParameter
sqlParaVendorBRN = new SqlParameter("@vendorbrn", SqlDbType.VarChar,
10);//Vendor BRN sqlParaVendorBRN.Value =
vendorbrn; cmd_ContractList.Parameters.Add(sqlParaVendorBRN);
SqlParameter
sqlParaVendorName = new SqlParameter("@name", SqlDbType.VarChar, 140);//Vendor
Name sqlParaVendorName.Value =
name; cmd_ContractList.Parameters.Add(sqlParaVendorName);
SqlParameter
sqlParaProducts = new SqlParameter("@products", SqlDbType.VarChar,
1000);//Products/Services provided by vendor sqlParaProducts.Value =
products; cmd_ContractList.Parameters.Add(sqlParaProducts);
SqlParameter
sqlParaRFPRef = new SqlParameter("@rfpRef", SqlDbType.VarChar,
50);//RFPRef sqlParaRFPRef.Value =
rfpRef; cmd_ContractList.Parameters.Add(sqlParaRFPRef);
SqlParameter
sqlParaProjectTitle = new SqlParameter("@projectTitle", SqlDbType.VarChar,
50);//Project Title sqlParaProjectTitle.Value =
projectTitle; cmd_ContractList.Parameters.Add(sqlParaProjectTitle);
SqlParameter
sqlParaAlert = new SqlParameter("@alert", SqlDbType.VarChar,
1);//Alert sqlParaAlert.Value =
alert; cmd_ContractList.Parameters.Add(sqlParaAlert);
return
executeNotQuery(cmd_ContractList);
}
|