コード例 #1
0
        //protected UserService userService;
        //protected CustomerService customerService;
        //protected RoleService roleService;
        //protected FlowService flowService;
        //protected OrderService orderService;

        protected override void OnInit(EventArgs e)
        {
            // 然后根据配置文件的数据库类型,初始化数据访问对象 [6/15/2008]
            switch (Properties.Settings.Default.DBTYPE.ToLower())
            {
            case "ole":
                //dataCommon = new OleDataCommon();
                break;

            case "sql":
                dataCommon = new SqlDataCommon(Powerson.Web.Properties.Settings.Default.CONNECTSTRING);
                break;

            default:
                break;
            }
            // 初始化用户服务对象 [9/23/2008]
            userService     = new EcrmUserBinding();
            customerService = new EcrmCustomerBinding();
            //this.userService = new UserService();
            //userService.ServiceDataCommon = this.dataCommon;
            //customerService = new CustomerService();
            //customerService.ServiceDataCommon = this.dataCommon;
            //roleService = new RoleService();
            //roleService.ServiceDataCommon = this.dataCommon;
            //flowService = new FlowService();
            //flowService.ServiceDataCommon = dataCommon;
            //orderService = new OrderService();
            //orderService.ServiceDataCommon = dataCommon;

            base.OnInit(e);
        }
コード例 #2
0
ファイル: UserControlBase.cs プロジェクト: chenxun/ecrm
        //protected RoleService roleService;
        //protected FlowService flowService;
        //protected OrderService orderService;
        //private CommandNameType ctrlAction = CommandNameType.NULL;
        protected override void OnInit(EventArgs e)
        {
            // 然后根据配置文件的数据库类型,初始化数据访问对象 [6/15/2008]
            switch (Properties.Settings.Default.DBTYPE.ToLower())
            {
            case "ole":
                //dataCommon = new OleDataCommon();
                break;

            case "sql":
                //dataCommon = new SqlDataCommon(Properties.Settings.Default.CONNECTSTRING);
                break;

            default:
                break;
            }
            userService     = new EcrmUserBinding();
            customerService = new EcrmCustomerBinding();
            //GetMe();
            base.OnInit(e);
        }