Example #1
0
        public ViewModel()
        {
            m_dal = new MockMemoryDAL();
            this.Events = m_dal.GetEvents();

            m_saveCommand = new SaveCommand(this);
        }
 public DalManager()
 {
     typeBDD = _typeBDD.SQL;
     if(typeBDD==_typeBDD.SQL){
         usingDal = new DALSqlServer();
     }
 }
Example #3
0
 public Agent(string company, int qty, decimal targetPrice, IDAL dal)
 {
     this.Company = company;
     this.Qty = qty;
     this.TargetPrice = targetPrice;
     this.Dal = dal;
 }
Example #4
0
 private DALManager(DALProvider provider)
 {
     if (provider == DALProvider.SQLSERVER)
     {
         //_dal = new DALSQLServer(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Gaetan\Documents\Git\Csharp\DataAccessLayer\EventAgenda.mdf;Integrated Security=True");
         _dal = new DALSQLServer(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=D:\Projet\Csharp\DataAccessLayer\EventsAgenda.mdf;Integrated Security=True");
     }
 }
Example #5
0
        public SalaryStandGenerator()
        {
            InitializeComponent();
            dal = new SMT_HRM_EFModel.SMT_HRM_EFModelContext();
            PermissionWS.PermissionServiceClient pclient = new PermissionWS.PermissionServiceClient();
            var ents = pclient.GetDictionaryByCategoryArray(new string[] { "POSTLEVEL" });

            foreach (var item in ents)
            {
                postlevels.Add(item.DICTIONARYNAME, item.DICTIONARYVALUE.ToString());
            }
        }
 /*Section="Constructor-2"*/
 internal SuggestionTypeService(IDAL dal)
     : base(dal)
 {
 }
        private WDGatherPerformanceSummary getWDGatherPerformanceSummary(IDAL dal, int gatheringType)
        {
            IUniParameter prmGatheringType = dal.CreateParameter("GatheringType", gatheringType);

            return(dal.Read <WDGatherPerformanceSummary>("WHS_SEL_WDGATHERPERFORMANCESUMMARY_SP", prmGatheringType));
        }
 /*Section="Constructor-2"*/
 internal RequestAdditionalInfoService(IDAL dal)
     : base(dal)
 {
 }
Example #9
0
 /// <summary>
 /// Constructeur de la classe.
 /// Crée une instance de DalManager.
 /// </summary>
 public BusinessManager()
 {
     _dal = DALManager.GetInstance(DALProvider.SQLSERVER).DataAccessLayer;
 }
Example #10
0
        private WDWidgetData getWDWidgetData(IDAL dal, Nullable <DateTime> gatheringDate)
        {
            IUniParameter prmGatheringDate = dal.CreateParameter("GatheringDate", gatheringDate.HasValue ? gatheringDate : null);

            return(dal.Read <WDWidgetData>("WHS_SEL_WDORDERWIDGET_SP", prmGatheringDate));
        }
Example #11
0
 /*Section="Constructor-2"*/
 internal StorePropertyTypeService(IDAL dal)
     : base(dal)
 {
 }
Example #12
0
 public ListagemViewModel()
 {
     Clientes    = new ObservableCollection <Cliente>();
     clientesDAL = new ClienteDAL(DependencyService.Get <IDBPath>().GetDbPath());
     RegistrarCommands();
 }
Example #13
0
 public MachineService(IUnityContainer containier)
 {
     dbHelper = containier.Resolve<IDAL>();
 }
 public Vehicles(IDAL dal)
 {
     this.dal = dal;
 }
Example #15
0
 public OrderRecord(IDAL repository)
 {
     _repository = repository;
 }
Example #16
0
 public Logic()
 {
     dal = new DBWork();
 }
Example #17
0
 public void setProvider(DALProvider provider)
 {
     //a completer
     string connexion = @"Data Source =(LocalDB)\v11.0;AttachDbFilename=C:\Users\Florian\Documents\MyAgenda\DataAccessLayer\EventsAgenda.mdf";
     switch (provider)
     {
         case DALProvider.ORACLE:
             break;
         case DALProvider.SQLSERVER:
             DataAccessLayer = new DALSQLServer(connexion);
             break;
     }
 }
Example #18
0
 public CoupeManager()
 {
     data = DALManager.GetInstance(DALProvider.SQLSERVER);
 }
Example #19
0
 public PersonManager(ILog log, IDAL<Person, int> personDAL)
 {
     this._log = log;
     this._personDAL = personDAL;
 }
Example #20
0
 /*Section="Constructor-2"*/
 internal TransactionTypeService(IDAL dal)
     : base(dal)
 {
 }
 public HomeController(IDAL dalParam)
 {
     DAL = dalParam;
 }
Example #22
0
 /*Section="Constructor-2"*/
 internal OverStoreScreenPropertyService(IDAL dal)
     : base(dal)
 {
 }
Example #23
0
        private void btnConn_Click(object sender, EventArgs e)
        {
            if (txtConn.Text.Length == 0)
            {
                lblMessage.Text = "连接字符串不能为空";
                return;
            }
            try
            {
                dal = DALFacotry.Create(cbbDbtype.Text, txtConn.Text);
                if (dal == null)
                {
                    lblMessage.Text = "暂时不支持该数据库 敬请期待";
                    return;
                }
            }
            catch (Exception)
            {
                lblMessage.Text = "数据库异常 请确认";
                return;
            }

            lblMessage.Text = "成功连接数据库";
            //成功连接之后将配置保存
            ini.WriteValue("Set", "index", cbbDbtype.SelectedIndex);
            ini.WriteValue("Set", "index_" + cbbDbtype.SelectedIndex, txtConn.Text);
            //加载表信息
            ckbTables.Items.Clear();
            ckbData.Items.Clear();
            var dt = dal.GetTables();
            if (dt.Rows.Count == 0)
            {
                lblMessage.Text = "查询表信息异常,请选择正确的数据库!";
                return;
            }
            foreach (DataRow dr in dt.Rows)
            {
                ckbTables.Items.Add(dr["表名"].ToString());
                ckbData.Items.Add(dr["表名"].ToString());
            }
            groupBox1.Enabled = true;
        }
Example #24
0
 public ProductService(IUnityContainer containier)
 {
     dbHelper = containier.Resolve<IDAL>();
 }
 public TaxRecord(
     IDAL id)
 {
     d = id;
 }
Example #26
0
        public void createMikroWaybill(long productReturnId, IDAL dal)
        {
            IUniParameter prmProductReturnId = dal.CreateParameter("ProductReturnId", productReturnId);

            dal.ExecuteNonQuery("WHS_INS_MIKROPRODUCTRETURN_SP", prmProductReturnId);
        }
 public Loans(IDAL dal)
 {
     this.dal = dal;
 }
Example #28
0
 /*Section="Constructor-2"*/
 internal GatheringService(IDAL dal)
     : base(dal)
 {
 }
 public void SetDal(IDAL dal)
 {
     this.dal = dal;
 }
Example #30
0
        private IList <WDGatheringDifference> listWDGatheringDifference(IDAL dal, Nullable <DateTime> gatheringDate)
        {
            IUniParameter prmGatheringDate = dal.CreateParameter("GatheringDate", gatheringDate.HasValue ? gatheringDate : null);

            return(dal.List <WDGatheringDifference>("WHS_LST_WDGATHERINGDIFF_SP", prmGatheringDate).ToList());
        }
Example #31
0
 public PersonBLL(IDAL.IPersonDAL dal)
 {
     this.dal = dal;
 }
Example #32
0
        private void startSuggestionProcess(DataModels.Announcement.Suggestion dataModel, IDAL dal)
        {
            int              processDefinitionId = _parameterReader.ReadPublicParameter <int>("OneriSureci", 2011);
            var              processInstanceRef  = dataModel.SuggestionId.ToString();
            GroupOperations  gop = new GroupOperations(dal);
            Group            suggestionAdminGroup = gop.FindGroup("Öneri Değerlendirme Kullanıcıları");
            IProcessInstance processInstance      = new ProcessInstance(processDefinitionId, OTApplication.Context.User.Id);

            //Set Process Variables
            processInstance.AddProcessVariable("user", OTApplication.Context.User.Id);
            processInstance.AddProcessVariable("screenReference", "Announcement#SuggestionListComponent#" + processInstanceRef);
            processInstance.AddProcessVariable("suggestionAdminGroup", suggestionAdminGroup.GroupId);
            processInstance.AddProcessVariable("suggestionId", dataModel.SuggestionId);


            //Set Action Varibles
            processInstance.AddActionVariable("user", OTApplication.Context.User.Id);
            //processInstance.AddActionVariable("description", dataModel.Description);

            //Start Process
            var processId = processInstance.Start(processInstanceRef);

            dataModel.ProcessInstance = processId;
            dal.Update(dataModel);
        }
Example #33
0
 public PlanService(IUnityContainer containier)
 {
     this.containier = containier;
     dbHelper = containier.Resolve<IDAL>();
 }
Example #34
0
 public BL(IDAL DAL, AuthenticationInfo currentUser)
 {
     this.DAL    = DAL;
     CurrentUser = currentUser;
 }
Example #35
0
 public OrderSelectBuild(IDAL dal) : base(dal, SqlHelper.Instance)
 {
 }
Example #36
0
 /*Section="Constructor-2"*/
 internal RequestGroupService(IDAL dal)
     : base(dal)
 {
 }
Example #37
0
 public PesquisarViewModel()
 {
     clienteDAL          = new ClienteDAL(DependencyService.Get <IDBPath>().GetDbPath());
     ClientesEncontrados = new ObservableCollection <Cliente>();
     RegistrarCommands();
 }
Example #38
0
 /*Section="Constructor-2"*/
 internal FakeOrderService(IDAL dal)
     : base(dal)
 {
 }
Example #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoviesController"/> class.
 /// </summary>
 /// <param name="logger">log instance</param>
 public MoviesController(ILogger <MoviesController> logger)
 {
     this.logger = logger;
     dal         = App.CosmosDal;
 }
 /*Section="Constructor-2"*/
 internal ProductPropertyService(IDAL dal)
     : base(dal)
 {
 }
Example #41
0
 public DeviseBLO()
 {
     deviseBLO = new RepositoireDAOFile <Devise>();
 }
 public static void SetDal(IDAL newDal)
 {
     dal = newDal;
 }
 public FisicaRepositorio()
 {
     fisicaDao = DaoFactory.GetFisicaDao();
     telefoneDao = DaoFactory.GetTelefoneDao();
 }
Example #44
0
        private static void populateDB(IDAL dal)
        {
            // Remove all data from DB
            dal.Clear <Course>();
            dal.Clear <Enrollment>();
            dal.Clear <Lane>();
            dal.Clear <Monitor>();
            dal.Clear <Payment>();
            dal.Clear <Person>();
            dal.Clear <Pool>();
            dal.Clear <User>();


            Pool        pool  = new Pool(1, Convert.ToDateTime("08:00:00"), Convert.ToDateTime("14:00:00"), 46122, 5, 5, 2.00);
            List <Lane> lanes = new List <Lane>();

            for (int i = 1; i <= 6; i++)
            {
                lanes.Add(new Lane(i));
            }

            pool.Lanes = lanes;
            dal.Insert(pool);



            User person1 = new User("Ona Carbonell address", "Ona Carbonell", "1234567890", 46002, "ES891234121234567890", new DateTime(1990, 06, 05), false);
            User person2 = new User("Gemma Mengual adress", "Gemma Mengual", "2345678901", 46002, "ES891234121234567890", new DateTime(1997, 04, 12), false);
            User person3 = new User("Mirella Belmonte's adress", "Mirella Belmonte", "3456789012", 46003, "ES891234121234567890", new DateTime(1990, 11, 10), false);
            User person4 = new User("Rigoberto's adress", "Rigoberto", "4567890123", 46122, "ES891234121234567890", new DateTime(1995, 02, 28), false);
            User person5 = new User("Lázaro's adress", "Lázaro", "5678901234", 46122, "ES891234121234567890", new DateTime(1992, 01, 01), false);

            Monitor person6 = new Monitor("X-00000001", "Michael Phelps", " Michael Phelps' adress", 46001, "ES891234121234567890", "SSN01010101");

            dal.Insert(person6);

            dal.Insert(person1);
            dal.Insert(person2);
            dal.Insert(person3);
            dal.Insert(person4);
            dal.Insert(person5);

            dal.Insert(person6);

            TimeSpan timeCourse  = new TimeSpan(0, 45, 0);
            TimeSpan timeCourse2 = new TimeSpan(1, 0, 0);

            Course course = new Course("Learning with M. Phelps", new DateTime(2017, 11, 6), new DateTime(2018, 6, 29), Convert.ToDateTime("09:30:00"), new TimeSpan(0, 45, 0),
                                       Days.Monday | Days.Wednesday | Days.Friday,
                                       6, 20, false, 100);

            course.Monitor = person6;

            Course course1 = new Course("Swimming for Dummys", new DateTime(2017, 11, 07), new DateTime(2018, 06, 29), Convert.ToDateTime("19:00"), new TimeSpan(1, 0, 0),
                                        Days.Tuesday | Days.Thursday, 8, 16, true, 75);



            course.Lanes.Add(pool.Lanes.ElementAt(0));
            course.Lanes.Add(pool.Lanes.ElementAt(1));
            course1.Lanes.Add(pool.Lanes.ElementAt(2));

            dal.Insert(course);
            dal.Insert(course1);

            Payment payment1 = new Payment(new DateTime(2017, 08, 10), "Free Swim", 3);
            Payment payment2 = new Payment(new DateTime(2017, 08, 20), "Free Swim", 3);
            Payment payment3 = new Payment(new DateTime(2017, 08, 20), "Free Swim", 3);
            Payment payment4 = new Payment(new DateTime(2017, 08, 16), "First monthly quota - Learning with M. Phelps", 100);
            Payment payment5 = new Payment(new DateTime(2017, 08, 26), "First monthly quota - Learning with M. Phelps", 100);
            Payment payment6 = new Payment(new DateTime(2017, 08, 28), "First monthly quota - Learning with M. Phelps", 100);
            Payment payment7 = new Payment(new DateTime(2017, 08, 28), "Swimming for Dummys", 75);
            Payment payment8 = new Payment(new DateTime(2017, 09, 04), "Swimming for Dummys", 75);

            dal.Insert(payment1);
            dal.Insert(payment2);
            dal.Insert(payment3);
            dal.Insert(payment4);
            dal.Insert(payment5);
            dal.Insert(payment6);
            dal.Insert(payment7);
            dal.Insert(payment8);

            Enrollment enrollment1 = new Enrollment(null, new DateTime(2017, 08, 16), null, course, person1, payment4);
            Enrollment enrollment2 = new Enrollment(null, new DateTime(2017, 08, 26), null, course, person2, payment5);
            Enrollment enrollment3 = new Enrollment(null, new DateTime(2017, 08, 28), null, course, person3, payment6);
            Enrollment enrollment4 = new Enrollment(new DateTime(2017, 10, 20), new DateTime(2017, 08, 28), null, course1, person4, payment7);
            Enrollment enrollment5 = new Enrollment(new DateTime(2017, 10, 20), new DateTime(2017, 09, 04), null, course1, person5, payment8);

            dal.Insert(enrollment1);
            dal.Insert(enrollment2);
            dal.Insert(enrollment3);
            dal.Insert(enrollment4);
            dal.Insert(enrollment5);



            dal.Commit();
        }
Example #45
0
 protected void CreateDAL()
 {
     if (App.Current != null)
     {
         String dalText = Properties.Settings.Default["DAL"].ToString();
         Type t = Type.GetType(dalText);
         _dal = (IDAL)(Activator.CreateInstance(t));
     }
 }
Example #46
0
 public PlayerUoW(SqlDAL iDAL, IPlayerRepo PlayerRepo)
 {
     _iDAL       = iDAL;
     _playerRepo = PlayerRepo;
 }
Example #47
0
 public CuentasHandler(IConfiguration config, IDAL <Cuenta> cuentasDal)
 {
     Configuration = config;
     CuentasDAL    = cuentasDal;
 }
Example #48
0
 public TitleController(IDAL dalObject)
 {
     dal = dalObject;
 }
 public BLUser(IDAL dal)
 {
     _dal = dal;
 }
Example #50
0
 /// <summary>
 ///  Constructor
 /// </summary>
 /// <param name="logger">log instance</param>
 /// <param name="dal">data access layer instance</param>
 public ActorsController(ILogger <ActorsController> logger, IDAL dal)
 {
     // save to local for use in handlers
     _logger = logger;
     _dal    = dal;
 }
Example #51
0
 public UserclaimSelectBuild(IDAL dal) : base(dal, SqlHelper.Instance)
 {
 }
Example #52
0
 public ProductController()
 {
     dal = new DAL();
 }
Example #53
0
 //Constructors:
 public Employee_BL(IDAL dal)
 {
     itsDAL    = dal;
     itsUserBL = new User_BL(itsDAL);
 }
Example #54
0
 private DalManager(DALProvider pro)
 {
     if (pro == DALProvider.SQLSERVER)
         _dal = new DALSQLServer();
 }
 public BL_imp()//CTOR
 {
     newDal = DAL.FactoryAndSingletonDal.GetDAL();
 }