private void ConnectionCheck_Click(object sender, EventArgs e) { BuildConnection(); if (ConnectionStringGetter.Check(ConnectionBuilder.ConnectionString)) { MessageBox.Show("Connection is successful"); } else { MessageBox.Show("Connection failed"); } }
private void ConnectionSave_Click(object sender, EventArgs e) { BuildConnection(); if (ConnectionStringGetter.Check(ConnectionBuilder.ConnectionString)) { MessageBox.Show("Check Yapildi."); ConnectionBuilder.InitialCatalog = "IplikVeKumas"; ConnectionStringGetter.Set(ConnectionBuilder.ConnectionString); MessageBox.Show("Set Edildi."); IfSaved = true; } else { MessageBox.Show("Connection failed"); } }
public VeriGirisForm() { InitializeComponent(); if (!ConnectionStringGetter.Check()) { ConnectionForm ConnectionForm = new ConnectionForm(); ConnectionForm.ShowDialog(); } MachineComboBox.Enabled = false; FactoryComboBox.Properties.Items.AddRange(worker.FactoryService.Select(null, c => c.FactoryName).ToList()); ShiftsComboBox.Properties.Items.AddRange(Enum.GetValues(typeof(Shifts)).Cast <Shifts>().ToList()); GridViewRefresh(); CrashTypeControl.Properties.Items.AddRange(Enum.GetValues(typeof(MaintanenceType)).Cast <MaintanenceType>().ToList()); }
public MainForm() { InitializeComponent(); if (!ConnectionStringGetter.Check()) { ConnectionForm ConnectionForm = new ConnectionForm(); ConnectionForm.ShowDialog(); } DateTime start = DateTime.Now; Arranger(WindowsIdentity.GetCurrent()); DateTime finish = DateTime.Now; MessageBox.Show((finish - start).ToString()); MessageBox.Show(worker.ManipulatorEmployeeService.Get(c => c.Name == "Berker").RelatedFactory.FactoryName); }
public KumasAndIplikUOW(string ConnectionString = null) { if (ConnectionString == null) { Context = new KumasAndIplikContext(ConnectionStringGetter.Get()); } else { Context = new KumasAndIplikContext(ConnectionString); } CrashRegister = new CrashRegisterDAL(Context); Factory = new FactoryDAL(Context); Machine = new MachineDAL(Context); MachineComponent = new MachineComponentDAL(Context); StenterMachine = new StenterMachineDAL(Context); Employee = new EmployeeDAL(Context); ManipulatorEmployee = new ManipulatorEmployeeDAL(Context); }