Beispiel #1
0
 public static T GeneralValue <T>(string sp, object parameter, WebControl actionControl)
 {
     if (WebConfig.RunningModel() == "Design")
     {
         actionControl.ToolTip = sp;
     }
     return(GeneralValue <T>(sp, parameter));
 }
Beispiel #2
0
        public static T GeneralValue <T>(string className, string action, object parameter, WebControl actionControl)
        {
            string sp = BLL.Common.SPName(className, action, parameter);

            if (WebConfig.RunningModel() == "Design")
            {
                actionControl.ToolTip = sp;
            }
            return(GeneralValue <T>(sp, parameter));
        }
Beispiel #3
0
        public static List <T> GeneralList <T>(List <CommonSP> classSP, string action, object parameter, WebControl actionControl)
        {
            string sp = BLL.Common.SPName(classSP, action, parameter);

            if (WebConfig.RunningModel() == "Design")
            {
                actionControl.ToolTip = sp;
            }
            return(GeneralList <T>(sp, parameter));
        }
Beispiel #4
0
        public static List <T> GetList(string dataSource, string obj, object parameter, WebControl actionControl)
        {
            if (WebConfig.RunningModel() == "Design")
            {
                var _sp = MapClass <T2> .SPName("Read");

                actionControl.ToolTip = CheckStoreProcedureParameters.GetParamerters(_sp, parameter);
            }
            return(RunGetListFromDB(dataSource, obj, parameter));
        }
Beispiel #5
0
        public static List <T> GetListbyID(IActionApp <T> action, int para, HtmlControl actionControl)
        {
            //  var list = action.GetObjByID(para);

            if (WebConfig.RunningModel() == "Design")
            {
                actionControl.Attributes.Add("title", action.GetSPName("Read"));
            }

            return(GetListbyID(action, para));
        }
Beispiel #6
0
        private void DefaultLoad()
        {
            WorkingProfile.PageCategory = "Home";
            WorkingProfile.PageArea     = "General";
            WorkingProfile.PageItem     = "EPA00";
            hfPageID.Value        = "Default";
            hfUserLoginRole.Value = WorkingProfile.UserRoleLogin;
            hfUserID.Value        = WorkingProfile.UserId;
            hfRunningModel.Value  = WebConfig.RunningModel();



            if (DBConnection.CurrentDB != "Live")
            {
                LabelTrain.Text    = DBConnection.CurrentDB;
                LabelTrain.Visible = true;
            }
            try
            {
                var parameter = new CommonListParameter()
                {
                    Operate  = "UserRole",
                    UserID   = WorkingProfile.UserId,
                    UserRole = "",
                    Para1    = "",
                    Para2    = "",
                    Para3    = "",
                    Para4    = ""
                };

                AppsPage.BuildingList(rblLoginAS, "UserRole", parameter, WorkingProfile.UserRole);

                LoginUserRole.InnerText = WorkingProfile.UserId + " as " + rblLoginAS.SelectedItem.Text;

                hfCurrentUserRole.Value = WorkingProfile.UserRole;

                GetUserLastWorkingValue();
            }
            catch (Exception ex)
            {
                string em = ex.StackTrace;
            }
            string pId = Page.Request.QueryString["pID"];

            pId = GetDefaultListbyRole();  // "Loading.aspx?pID=Summary";

            GoList.Attributes.Add("src", pId);
        }
Beispiel #7
0
 public static void SetPageAttribute2(Page myPage)
 {
     try
     {
         var myControl = (HiddenField)myPage.FindControl("hfCategory");
         myControl.Value = WorkingProfile.PageCategory;
         myControl       = (HiddenField)myPage.FindControl("hfPageID");
         myControl.Value = WorkingProfile.PageItem;
         myControl       = (HiddenField)myPage.FindControl("hfCode");
         myControl.Value = WorkingProfile.PageItem;
         myControl       = (HiddenField)myPage.FindControl("hfArea");
         myControl.Value = WorkingProfile.PageArea;
         myControl       = (HiddenField)myPage.FindControl("hfUserLoginRole");
         myControl.Value = WorkingProfile.UserRoleLogin;
         myControl       = (HiddenField)myPage.FindControl("hfRunningModel");
         myControl.Value = WebConfig.RunningModel();
         myControl       = (HiddenField)myPage.FindControl("hfContentChange");
         myControl.Value = "0";
     }
     catch
     {}
 }
Beispiel #8
0
 public static void SetPageAttribute(Page myPage)
 {
     try
     {
         var myControl = (HiddenField)myPage.FindControl("hfSchoolYear");
         myControl.Value = WorkingProfile.SchoolYear;
         myControl       = (HiddenField)myPage.FindControl("hfPageID");
         myControl.Value = WorkingProfile.PageItem;
         myControl       = (HiddenField)myPage.FindControl("hfSchoolCode");
         myControl.Value = WorkingProfile.SchoolCode;
         myControl       = (HiddenField)myPage.FindControl("hfSchoolArea");
         myControl.Value = WorkingProfile.SchoolArea;
         myControl       = (HiddenField)myPage.FindControl("hfUserLoginRole");
         myControl.Value = WorkingProfile.UserRoleLogin;
         myControl       = (HiddenField)myPage.FindControl("hfRunningModel");
         myControl.Value = WebConfig.RunningModel();
         myControl       = (HiddenField)myPage.FindControl("hfContentChange");
         myControl.Value = "0";
         myControl       = (HiddenField)myPage.FindControl("hfStudentID");
         myControl.Value = WorkingProfile.UserEmployeeId;
     }
     catch
     {}
 }