static private bool Init(string db, string user) { if (Context == null) { IModelsRepository modelsRepository = new ModelsRepository(); Context = modelsRepository.GetModelContext(db); if (Context != null) { Licence.InitLicence(Context.Kernel, null); SetUser(Context, user); } else { return(false); } } if (ClipperApi == null) { ClipperApi = new ClipperApi(); ClipperApi.InitAlmaCam(Context); } return(true); }
private void Reset_Click(object sender, EventArgs e) { ClipperApi = new ClipperApi(); ClipperApi.ExitAlmaCam(); this.Init.Enabled = true; this.Export.Enabled = false; this.ExportUI.Enabled = false; }
private void Init_Click(object sender, EventArgs e) { AlmaCamDB = comboDataBaseList.Text;///txt_Database.Text;; User = "******"; ClipperApi = new ClipperApi(); ClipperApi.ConnectAlmaCamDatabase(AlmaCamDB, User); this.Init.Enabled = false; this.Export.Enabled = true; this.ExportUI.Enabled = true; }
private void Init_Click(object sender, EventArgs e) { AlmaCamDB = comboDataBaseList.Text;///txt_Database.Text;; User = "******"; ClipperApi = new ClipperApi(); if (string.IsNullOrEmpty(AlmaCamDB) != true) { ClipperApi.ConnectAlmaCamDatabase(AlmaCamDB, User); this.Init.Enabled = false; this.Export.Enabled = true; this.ExportUI.Enabled = true; this.Select_Quote.Enabled = true; } }