private void button4_Click(object sender, EventArgs e) { var index = new IndexForm(); this.Hide(); index.Show(); }
public QCMResultUC(IndexForm _mainForm) { mainForm = _mainForm; InitializeComponent(); evalResult = EvaluationResult.Instance; Init(); }
private void buttonOdebrani_Click(object sender, EventArgs e) { //connection DataBase IndexForm connIndex = new IndexForm(); string conn = connIndex.Conn; string query = $"delete from zapocetmswin2.jidlo where id_jidlo={id_jidlo}"; try { using (MySqlConnection mySqlConn = new MySqlConnection(conn)) { using (MySqlCommand cmd = new MySqlCommand(query, mySqlConn)) { using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd)) { DataTable dt = new DataTable(); adapter.Fill(dt); dataGridNazev.DataSource = dt; } } } } catch (Exception exception) { MessageBox.Show(exception.Message); } dataGridNazev.DataSource = this.PopulateJidlo(); dataGridNazev.Columns[0].Visible = false; }
private DataTable PopulateJidlo() { //connection DataBase IndexForm connIndex = new IndexForm(); string conn = connIndex.Conn; string query = "select id_jidlo, nazev_jidlo 'Nazev jidlo', vaha, cena, nazev_kategorie 'kategorie' from zapocetmswin2.jidlo natural join zapocetmswin2.kategorie"; query += $" WHERE nazev_jidlo LIKE '{textBoxHledani.Text}%'"; try { using (MySqlConnection mySqlConn = new MySqlConnection(conn)) { using (MySqlCommand cmd = new MySqlCommand(query, mySqlConn)) { using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd)) { DataTable dt = new DataTable(); adapter.Fill(dt); return dt; } } } } catch (Exception exception) { MessageBox.Show(exception.Message); return null; } }
public override void _Create() { if (mpb == null) { mpb = new MaterialPropertyBlock(); } if (verts == null) { verts = GetComponent <MeshVerts>(); } if (triangles == null) { triangles = GetComponent <MeshTris>(); } if (!skipFormBind) { SafeInsert(verts); SafeInsert(triangles); } mpb.SetInt("_VertCount", verts.count); mpb.SetBuffer("_VertBuffer", verts._buffer); mpb.SetBuffer("_TriBuffer", triangles._buffer); DoCreate(); }
// TODO CHECK IF ALREADY CREATED!!!! public virtual void Create(Form verts, IndexForm triangles) { material = new Material(material); mesh = new Mesh(); mesh.vertices = new Vector3[verts.count]; int[] tris = new int[triangles.count]; triangles.GetData(tris); mesh.triangles = tris; if (verts.count > 65000) { mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; } mesh.bounds = new Bounds(Vector3.zero, Vector3.one * 1000f); mesh.UploadMeshData(true); go = new GameObject(); go.name = gameObject.name + " : BODY"; go.transform.parent = gameObject.transform; go.AddComponent <MeshFilter>().mesh = mesh; render = go.AddComponent <MeshRenderer>(); render.material = material; render.enabled = false; }
void OpenWindow(string command) { IndexForm form = new IndexForm(command); form.Owner = this; form.ShowDialog(); }
private void buttonClose_Click(object sender, EventArgs e) { //Environment.Exit(0); Close(); IndexForm indexForm = new IndexForm(); indexForm.Show(); }
public IndexUC(IndexForm _mainForm) { InitializeComponent(); mainForm = _mainForm; //Ici, on gère la récupération de l'avancement possible de l'utilisateur evalResult = EvaluationResult.Instance; saveFile = SaveFileUtility.Instance; evalResult = saveFile.GetCurrentProgression(); }
public JsonResult GetList() { var form = new IndexForm(); TryUpdateModel(form); var list = _thisBLL.QueryPager(form); var view = new IndexViewModel().GetView(list.ToList()); var jsonData = DataToPager.Do(form, view); return(Json(jsonData, JsonRequestBehavior.AllowGet)); }
public void CarregarTemplate() { IndexForm inicio = new IndexForm(); inicio.TopLevel = false; if (panel2.Controls.Count != 0) { panel2.Controls.RemoveAt(0); } panel2.Controls.Add(inicio); inicio.Show(); }
public async Task <IActionResult> OnGet() { await PopulateSelectListsAsync(); if (Membership == null) { return(NotFound()); } IndexForm = new IndexForm(); IndexForm.MemberId = Membership.ID; return(Page()); }
public QCMUC(IndexForm _mainForm, int _questionLeft) { InitializeComponent(); mainForm = _mainForm; questionHandler = QuestionHandler.Instance; questionLeft = _questionLeft; evalResult = EvaluationResult.Instance; result = evalResult.currentScoreQCM; //Utilisé pour écrire les résultats saveFile = SaveFileUtility.Instance; StartEvaluating(); }
static void Main() { DatabaseInitializer.Initialize(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new LoginForm()); LoginForm loginForm = new LoginForm();//加载登录窗体 if (loginForm.ShowDialog() == DialogResult.OK) { //Open your main form here //MessageBox.Show("Logged in successfully!"); indexForm = new IndexForm(); Application.Run(indexForm);//如果登录成功则打开主窗体 } }
private void dataGridNazev_CellContentClick(object sender, DataGridViewCellEventArgs e) { //connection DataBase IndexForm connIndex = new IndexForm(); string conn = connIndex.Conn; DataGridViewRow row = dataGridNazev.Rows[e.RowIndex]; id_jidlo = Convert.ToInt32(row.Cells[0].Value.ToString()); if (e.RowIndex >= 0) { try { using (MySqlConnection mySqlConn = new MySqlConnection(conn)) { mySqlConn.Open(); string query = $"select nazev_potraviny 'Nazev potraviny', pocet_suroviny, jednotka from zapocetmswin2.potraviny natural join zapocetmswin2.suroviny where id_jidlo= '{row.Cells[0].Value.ToString()}'"; using (MySqlCommand cmd = new MySqlCommand(query, mySqlConn)) { using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd)) { DataTable dt = new DataTable(); adapter.Fill(dt); dataGridSuroviny.DataSource = dt; } } string queryRecept = $"select recept from zapocetmswin2.jidlo where id_jidlo='{row.Cells[0].Value.ToString()}'"; using (MySqlCommand cmd = new MySqlCommand(queryRecept, mySqlConn)) { using (MySqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) textBoxRecept.Text = reader.GetString("recept"); } } mySqlConn.Close(); } } catch (Exception exception) { MessageBox.Show(exception.Message); } } }
public DijkstraUC(IndexForm _mainForm) { InitializeComponent(); mainForm = _mainForm; currentGraph = new Graph(); dijSolver = SearchTree.Instance; initNode = new AlphaBetNode(currentGraph.InitNode, currentGraph); endNode = new AlphaBetNode(currentGraph.EndNode, currentGraph); //Obtention des listes d'ouverts et de fermés successifs générées par le solveur appliqué //sur le graphe courant. openedClosedTracker = dijSolver.DijkstraSolve(currentGraph, initNode); evalResult = EvaluationResult.Instance; evalResult.DijkstraStatus = EvaluationResult.Status.In_Progress; }
private void button1_Click(object sender, EventArgs e) { DateTime fechaRendicion = ConfiguracionFecha.FechaSistema; //Valido si ya hubo una rendicion en este periodo para esta empresa string empresaCuit = ((ComboBoxItemStringValue)comboEmpresas.SelectedItem).Value; decimal porcentajeComision; if (this.facturas.Count > 0) { if (decimal.TryParse(txtPorcentaje.Text, out porcentajeComision) && porcentajeComision >= 0 && porcentajeComision <= 100) { bool yaHuboRendicion = RendicionesRepository.ExisteRendicionParaEmpresaYPeriodo(empresaCuit, fechaRendicion); if (!yaHuboRendicion) { Rendicion rend = new Rendicion(empresaCuit, facturas, fechaRendicion, porcentajeComision); try { RendicionesRepository.AgregarRendicion(rend); MessageBox.Show("Se ha realizado la rendición correctamente"); this.Hide(); var indexFacturasForm = new IndexForm(); indexFacturasForm.Show(); } catch (Exception exce) { MessageBox.Show("Hubo un error al realizar la rendicion. Intente nuevamente"); } } else { MessageBox.Show("Ya se realizó una rendición para esta empresa en este periodo"); } } else { MessageBox.Show("Ingrese un valor valido para el porcentaje"); } } else { MessageBox.Show("No se puede realizar una rendicion sin facturas asociadas"); } }
public EvaluatingUC(IndexForm _mainForm) { InitializeComponent(); mainForm = _mainForm; evalResult = EvaluationResult.Instance; //Quelques vérifications quant à l'avancement de l'utilisateur dans l'examen //afin d'afficher ou non ses résultats if (evalResult.DijkstraStatus == EvaluationResult.Status.Done) { labelDijkstraScore.Text = "Note Dijkstra : " + evalResult.resultDijkstra + "/3"; buttonDijkstra.Enabled = false; } else { labelDijkstraScore.Visible = false; } if (evalResult.QCMStatus == EvaluationResult.Status.Done) { labelQCMScore.Text = "Note QCM : " + evalResult.resultQCM + "/20"; buttonQCM.Enabled = false; } else { labelQCMScore.Visible = false; } if (evalResult.DijkstraStatus == EvaluationResult.Status.Done && evalResult.QCMStatus == EvaluationResult.Status.Done) { float finalNote = ((mainForm.evalResult.resultQCM + evalResult.resultDijkstra) / 23) * 20; labelFinalResult.Text = "Note totale : " + finalNote + "/20"; labelEvaluatingText.Text = "Vous avez terminé l'examen."; } else { labelFinalResult.Text = ""; } }
static void Main() { //DatabaseInitializer.Initialize(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); mutex = new System.Threading.Mutex(true, "DAMSRUNONLY"); if (mutex.WaitOne(0, false)) { LoginForm loginForm = new LoginForm();//加载登录窗体 if (loginForm.ShowDialog() == DialogResult.OK) { indexForm = new IndexForm(); Application.Run(indexForm);//如果登录成功则打开主窗体 } } else { MessageUtil.ShowMessage("程序已经在运行!", EnumData.MessageType.Warning); Application.Exit(); } }
public ActionResult Index() { int Employee_Id = SessionUser.GetUser().Id; IEnumerable <D.Team> Teams = TeamService.GetAllActiveTeamsForEmployee(Employee_Id); List <ProjectTeamsForm> ProjectTeamList = new List <ProjectTeamsForm>(); foreach (D.Team team in Teams) { ProjectTeamsForm element = ProjectTeamList.Where(pt => pt.Project.Id == team.Project_Id).FirstOrDefault(); if (element is null) { ProjectTeamsForm NewElement = new ProjectTeamsForm { Project = ProjectService.GetProjectById(team.Project_Id), Teams = new List <D.Team>() }; NewElement.Teams.Add(team); ProjectTeamList.Add(NewElement); } else { element.Teams.Add(team); } } IEnumerable <D.Department> MyDepartments = DepartmentService.GetEmployeeDepartments(Employee_Id); IndexForm form = new IndexForm { ProjectTeamList = ProjectTeamList, MyDepartments = DepartmentService.GetEmployeeActiveDepartments(Employee_Id), ProjectManagerProjects = ProjectService.GetActiveProjectsForManager(Employee_Id), TeamLeaderTeams = TeamService.GetActiveTeamsForTeamLeader(Employee_Id), HeadOfDepartmentDepartments = DepartmentService.GetHeadOfDepartmentActiveDepartments(Employee_Id) }; return(View(form)); }
private void MstPatientForm_FormClosing(object sender, FormClosingEventArgs e) { IndexForm indexForm = new IndexForm(); indexForm.Show(); }
public virtual void _Create(Form verts, IndexForm triangles) { _Create(); Create(verts, triangles); Create(); }