Exemplo n.º 1
0
        public static void SetLists(System.Web.UI.WebControls.ListControl myListControl, ParameterSP parameter)
        {
            string           sp     = "dbo.tcdsb_PLF_ListDDL2New @Operate,@UserID,@UserRole,@SchoolYear";
            List <List2Item> myList = GeneralDataAccess.GetObjectList <List2Item>(sp, parameter);

            AssemblingMyList(myListControl, myList);
        }
Exemplo n.º 2
0
        public static void SetLists2(System.Web.UI.WebControls.DropDownList myListControl, System.Web.UI.WebControls.DropDownList myListControl2, ParameterSP parameter)
        {
            string           sp     = "dbo.tcdsb_PLF_ListSchoolsNew @Operate,@UserID,@UserRole,@SchoolYear,@SchoolCode";
            List <List2Item> myList = GeneralDataAccess.GetObjectList <List2Item>(sp, parameter);

            AssemblingMyList(myListControl, myList, "myValue", "myValue"); // school Code DDL

            AssemblingMyList(myListControl2, myList, "myValue", "myText"); // School Name DDL
        }
Exemplo n.º 3
0
        public static void BindGridView(ref GridView myGridView, string listPage, string method, string userID, string schoolYear, string schoolCode)
        {
            try
            {
                ParameterSP parameter = new ParameterSP {
                    Operate = method, UserID = userID, SchoolYear = schoolYear, SchoolCode = schoolCode
                };
                //   List<SiteTeams> teams = GeneralDataAccess.GetTeamList(sp, parameter);
                List <SiteTeams> teams = GeneralDataAccess.GetObjectList <SiteTeams>(sp, parameter);

                myGridView.DataSource = teams;
                myGridView.DataBind();
            }
            catch (System.Exception ex)
            {
                string em = ex.Message;
            }
        }
Exemplo n.º 4
0
        public static List <FormContent> ListofContent(string schoolYear, string schoolCode)
        {
            try
            {
                string       sp        = "dbo.tcdsb_PLF_FormData_WebAPI @Operate,@UserID,@UserRole,@SchoolYear,@SchoolCode";
                ParameterSP0 parameter = new ParameterSP0 {
                    Operate = "Content", UserID = "", SchoolYear = schoolYear, SchoolCode = schoolCode
                };
                //  List<FormContent> myList = GeneralDataAccess.GetFormContentList(sp, parameter);
                List <FormContent> myList = GeneralDataAccess.GetObjectList <FormContent>(sp, parameter);

                return(myList);
            }
            catch (Exception ex)
            {
                var exm = ex.Message;
                return(null);
            }
        }