예제 #1
0
        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);
            }
        }
예제 #2
0
        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");
        }
예제 #3
0
        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());
        }
예제 #4
0
        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);
        }
예제 #5
0
 public static Contact HRContact(string JsonFile, string UserID)
 {
     return(JsonFileReader.CurrentOwner(JsonFile, UserID));
 }
예제 #6
0
 public static void SetListsFromJson(System.Web.UI.WebControls.ListControl myListControl, string ddlType, string JsonFile)
 {
     AssemblingMyListJson(myListControl, JsonFileReader.GetNvList(JsonFile, ddlType)); //GetListDataFromJson(ddlType, JsonFile));
 }
예제 #7
0
 public static EmailTemplateItem EmailSubjectAndTemple(string JsonFile, string pType, string action)
 {
     return(JsonFileReader.GetSubjectAndTemplate(JsonFile, pType, action));
 }
예제 #8
0
 public static string EmailHTMLBody(string eFile)
 {
     return(JsonFileReader.JsonString(eFile));
 }
예제 #9
0
 public static DataSourcePageList SPandPara_fromPageList(string JsonFile, string page, string action)
 {
     return(JsonFileReader.GetSP_fromPageList(JsonFile, page, action));
 }
예제 #10
0
        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());
        }