Looking for a highly experienced developer for a quick job to write a controller method for an MVC Web Application I am working on for a client, who required new features to be added. I have already completed most of this work in setting up the model, view and controller.
The new features allow the business users to do a search, edit the returned item and save back to database. When the user hits update on the form, the update controllers POST method has to do the following:
1. Update the BIN table being edited by user.
2. Execute a stored procedure to concatenate the BIN + Country Code to get a SupplierUID.
3. Rename the Supplier Due Diligence Documents parent folders on SharePoint with the new SupplierUID.
I have already completed 1 and 2, but need a very good developer to quickly finish number 3.
- This is a MVC Application using EF6 with the Model, Classes, and Connections all setup.
- SharePoint is setup to use the Azure Keyvault, that is included in the controller.
- There is already a method to get all supplier due diligence documents using the assessment id.
- Each supplier has a folder on SharePoint, with multiple documents that have different "Assessment ID's".
- Update method has to get the document assessment id's related to the original SupplierUID.
- Search SharePoint Folder for assessment id's related to the original Supplier.
- Rename the folder on SharePoint ( The folder name has two parts, AssessmentID and SupplierUID). Keep Assessment id, and rename SupplierUID portion of the Folder name with the new SupplierUID.
My approach was to create a data table and get data from SQL, then copy to SharePoint.
Where I need help with is to complete the code below. Specifically help around the missing steps that are commented:
// Get document assessment id's related to the original SupplierUID
DataTable dataTable = new DataTable();
string myQuery = "SELECT * FROM [scts_db_stg].[dbo].[SupplierProfiles] WHERE [SupllierUID] IS NOT NULL";
SqlCommand cmd = new SqlCommand(myQuery);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
// Data table needs to contain the assessment id's, and the new supplieruid
dt = GetDatafromSQL();
using (SPSite sctsSite = new SPSite(""))
// Connect to SharePoint
var _userSharePoint = KeyVaultSettings.UseKeyVault.Equals("Yes", StringComparison.OrdinalIgnoreCase) ?
KeyVaultSettings.SharePointUserName : ConfigurationManager.AppSettings["UserName"];
var _site = ConfigurationManager.AppSettings["Site"];
var _userpassword = KeyVaultSettings.UseKeyVault.Equals("Yes", StringComparison.OrdinalIgnoreCase) ?
KeyVaultSettings.SharePointPassword : ConfigurationManager.AppSettings["Password"];
var _destinationfolder = ConfigurationManager.AppSettings["DueDilligenceDocuments"];
ClientContext clientContext = new ClientContext("");
List list = clientContext.Web.Lists.GetByTitle("DueDilligenceDocuments");
FieldCollection fields = list.Fields;
using (SPWeb sctsWeb = sctsSite.RootWeb)
SPList sctsList = sctsWeb.Lists["DueDilligenceDocuments"];
foreach (DataRow row in dt.Rows) /// Loop over the rows
// Search for assessment id's related to the original supplier
// Rename the folder on SharePoint, keep Assessment id, and rename SupplierUID portion.