public DocsURL GenerateLink(DocsURL docsURL, Client client, string GUID) { string sp_name = "sp_AddDocsURL"; DocsURL uRL = new DocsURL(); string SiteURL = ConfigurationManager.AppSettings["SiteURL"].ToString(); var URL = SiteURL + "login/DocumentsUpload/index.html?id=" + GUID; Dictionary <string, object> dict = new Dictionary <string, object> { { "@ClientId", docsURL.ClientId }, { "@Division", docsURL.Division }, { "@GUID", GUID }, { "@CheckListId", docsURL.CheckListId }, { "@IPAddress", docsURL.RequestIP }, { "@RequestedBy", docsURL.RequestedBy }, { "@Subject", FormatEmail(docsURL.Subject, client, URL).Replace("\n", "<br />") }, { "@Body", FormatEmail(docsURL.Body, client, URL).Replace("\n", "<br />") }, { "@ToEmail", docsURL.ToEmail }, }; DataTable dt = InitializeAndExecute <DataTable>(sp_name, dict, Operation.select); if (dt.Rows.Count == 1) { uRL = new DocsURL(dt.Rows[0]); } return(uRL); }
public DocsURL FindByGUID(string GUID) { DocsURL uRL = new DocsURL(); string sp_name = "SELECT t1.*,t2.EmployeeName AS RequestedByName FROM tbl_DocsUrl t1 JOIN tbl_Employees t2 ON t1.GUID = @GUID AND t1.RequestedBy = t2.Employee_ID"; Dictionary <string, object> dict = new Dictionary <string, object> { { "@GUID", GUID } }; DataTable dt = InitializeAndExecute <DataTable>(sp_name, dict, Operation.select, false); if (dt.Rows.Count == 1) { uRL = new DocsURL(dt.Rows[0]); } return(uRL); }