public static DataSourceItem GetItemList(string JsonType, string JsonFile, string page, string action) { try { if (JsonType == "PageList") { DataSourcePageList myspname = JsonFileReader <DataSourcePageList> .GetSP_fromList(JsonFile, page, action); // DataSourceItemList myNewListOne = new DataSourceItemList(); var mylistPage = from p in myspname.DataAccessSource where p.Page == page select p.SourceList.FirstOrDefault(); var mylistItem = from s in mylistPage where s.Action == action select s; return(mylistItem.FirstOrDefault()); } else { return(JsonFileReader <DataSourceItemList> .GetSP_fromList(JsonFile, page, action).General.FirstOrDefault()); } } catch (System.Exception ex) { var em = ex.Message; return(null); } }
private static string GetSPFromJsonFile(string action) { string JsonFile = SPSource.SPFile; DataSourceItemList myspname = JsonFileReader <DataSourceItemList> .GetSP_fromList(JsonFile); var mylist = from p in myspname.Summary where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); return(mylist.FirstOrDefault()); // return GetSpNameFormJsonFile.SPName(action, "Summary"); }
private static string GetSPandPara_FromPageList(string JsonFile, string page, string action) { DataSourcePageList myspname = JsonFileReader <DataSourcePageList> .GetSP_fromList(JsonFile, page, action); var mylist = from p in myspname.DataAccessSource where p.Page == page select p.SourceList; var myNewListOne = mylist.FirstOrDefault(); // var result = JsonConvert.DeserializeObject<SPName>(myNewListOneStr); var mylistOne = from s in myNewListOne where s.Action == action select s.ObjName.ToString() + s.Parameters.ToString(); return(mylistOne.FirstOrDefault()); }
private static List <NvListItem> ListDataSource(string JsonSource, string ddlType, List2Item parameter) { List <NvListItem> myListData; if (JsonSource == "") { parameter.Operate = ddlType; // string SP = CommonExcute.SPNameAndParameters(JsonSource, "General", "DDList"); // myListData = CommonListExecute<NVListItem>.GeneralList(SP, parameter); // myListData = CommonExcute<NVListItem>.GeneralList(SP, parameter); myListData = GeneralExe.DDListNV(parameter); } else { myListData = JsonFileReader.GetNvList(JsonSource, ddlType); } return(myListData); }
public static Contact HRContact(string JsonFile, string UserID) { return(JsonFileReader.CurrentOwner(JsonFile, UserID)); }
public static void SetListsFromJson(System.Web.UI.WebControls.ListControl myListControl, string ddlType, string JsonFile) { AssemblingMyListJson(myListControl, JsonFileReader.GetNvList(JsonFile, ddlType)); //GetListDataFromJson(ddlType, JsonFile)); }
public static EmailTemplateItem EmailSubjectAndTemple(string JsonFile, string pType, string action) { return(JsonFileReader.GetSubjectAndTemplate(JsonFile, pType, action)); }
public static string EmailHTMLBody(string eFile) { return(JsonFileReader.JsonString(eFile)); }
public static DataSourcePageList SPandPara_fromPageList(string JsonFile, string page, string action) { return(JsonFileReader.GetSP_fromPageList(JsonFile, page, action)); }
public static string GetSPandPara_FromItemList(string JsonFile, string page, string action) { DataSourceItemList myspname = JsonFileReader <DataSourceItemList> .GetSP_fromList(JsonFile, page, action); // SPandPara(JsonFile, page, action); var mylist = from p in myspname.General where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString();; switch (page) { case "Request": mylist = from p in myspname.Request where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Approve": mylist = from p in myspname.Approve where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Publish": mylist = from p in myspname.Publish where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Candidate": mylist = from p in myspname.SelectCandidate where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Hiring": mylist = from p in myspname.Hiring where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Hired": mylist = from p in myspname.Hired where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Interview": mylist = from p in myspname.Interview where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Applying": mylist = from p in myspname.Apply where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "MultipleSchools": mylist = from p in myspname.MultipleSchools where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Staff": mylist = from p in myspname.Staff where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; case "Summary": mylist = from p in myspname.Summary where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; default: mylist = from p in myspname.General where p.Action == action select p.ObjName.ToString() + p.Parameters.ToString(); break; } return(mylist.FirstOrDefault()); }