public WareMinQuantity(int WareID) { InitializeComponent(); manager = new ContextManager(); context = manager.Context; wareId = WareID; Fill(); }
public CashRegisterData(CashRegister _CashRegister) { InitializeComponent(); cashRegister = _CashRegister; installationId = Logic.Config.InstallationIdentifyLogic.InstallationIDInt; manager = new ContextManager(); context = manager.Context; Logic.Config.ModesLogic modesLogic = new ModesLogic(manager); ModesCB.DataSource = modesLogic.GetAll(); ModesCB.DisplayMember = "Name"; ModesCB.ValueMember = "ID"; ModesCB.SelectedIndex = 0; //id інсталяції Fill(); }
//public ConnectionInfo GetConnectionInfo() //{ // ConnectionInfo crConnectionInfo = new ConnectionInfo(); // //Tables CrTables ; // //cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt"); // crConnectionInfo.ServerName = "10.11.0.4\\SQLEXPRESS2008R2,44444"; // crConnectionInfo.DatabaseName = "MKSDB"; // crConnectionInfo.UserID = "MKSDBUser"; // crConnectionInfo.Password = "******"; // return crConnectionInfo; //} public ContextManager() { Context = new CompasDataContext(this.GetEFConnectionString()); }
public ModesLogic(ContextManager contextManager) { context = contextManager.Context; }