1 FROM (Joins if available)
2 WHERE
3 GROUP BY
4 HAVING
5 SELECT
5.1 SELECT list
5.2 DISTINCT
6 ORDER BY
7 TOP / OFFSET-FETCH
1 FROM (Joins if available)
2 WHERE
3 GROUP BY
4 HAVING
5 SELECT
5.1 SELECT list
5.2 DISTINCT
6 ORDER BY
7 TOP / OFFSET-FETCH
I have created Sample class to the Key Values from application (appSettings.json). for that i have initialise the Configuration instance at Constructor level. Later on consumed same instance to get the Key Value.
Sample Code is Below
Calling from application
string Conn = ConfigurationExtension.GetConfigKeyValue("ConnectionStrings:DBConnection").ToString();
Base Code
public class ConfigurationExtension
{
IConfiguration configuration;
public ConfigurationExtension()
{
var builder = new ConfigurationBuilder()
.AddJsonFile("appSettings.json");
configuration = builder.Build();
}
/// <summary>
/// Get appSettings json key value ex Key: "ConnectionStrings:DBConnection"
/// </summary>
/// <param name="Key"></param>
/// <returns></returns>
public static string GetConfigKeyValue(string Key) {
ConfigurationExtension obj = new ConfigurationExtension();
string con = obj.configuration[Key].ToString();
return con;
}
}
using Syncfusion.XlsIO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;
private void SyncFileDocDemo()
{
//Creates an empty Word document instance
WordDocument document = new WordDocument();
//Loads or opens an existing word document through Open method of WordDocument class
document.Open(Server.MapPath(@"SpreadSheet.docx"));
document.Save(Server.MapPath("Result\\SpreadSheet.odt"), FormatType.Odt);
}
private void SyncFuExcelData()
{
//Step 1 : Instantiate the spreadsheet creation engine.
ExcelEngine excelEngine = new ExcelEngine();
//Step 2 : Instantiate the excel application object.
IApplication application = excelEngine.Excel;
//A new workbook is created.[Equivalent to creating a new workbook in Microsoft Excel]
//The new workbook will have 12 worksheets
IWorkbook workbook = application.Workbooks.Open(Server.MapPath(@"SpreadSheet.xls"));
string SaveOption = "Xls";
try
{
//Saving the workbook to disk.
if (SaveOption == "Xls")
{
//Save as .xls format
workbook.SaveAs(Server.MapPath("Result\\SpreadSheet.ods"), HttpContext.ApplicationInstance.Response, ExcelDownloadType.PromptDialog, ExcelHttpContentType.Excel97);
}
//Save as .xlsx format
else
{
workbook.Version = ExcelVersion.Excel2016;
workbook.SaveAs("SpreadSheet.xlsx", HttpContext.ApplicationInstance.Response, ExcelDownloadType.PromptDialog, ExcelHttpContentType.Excel2016);
}
}
catch (Exception)
{
}
}
For creating n level of dynamic navigation we required first data in JSON format.
Code base i will upload here.. including CSS and JS Complete code reference.
Working Code bundle is (Due to Code CSS application design is completed vanished ignore for outer design) Click Here for
Source Code and Preview is availble below
I found very good article here please visit here.
https://stackoverflow.com/questions/16626735/how-to-loop-through-an-array-containing-objects-and-access-their-properties