private void sgc_dv_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { product_select = sgc_dv.PrimaryGrid.GridPanel.GetSelectedRows().GetCells(); if (product_select.Count != 0) { if (MessageBox.Show("Esta seguro que quiere eliminarlo", "Quitar materia prima", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { sgc_dv.PrimaryGrid.Rows.Remove(sgc_dv.PrimaryGrid.GridPanel.GetSelectedRows()[0]); subTotal -= Convert.ToSingle(product_select[4].Value); subTotal = Convert.ToSingle(Math.Round((decimal)subTotal, 2)); tb_subtotal.Text = subTotal.ToString(); tb_iva.Text = (Math.Round(subTotal * 0.16, 2)).ToString(); tb_total.Text = (Math.Round(subTotal + (subTotal * 0.16), 2)).ToString(); ajustarDetalleVenta(product_select[1].Value, product_select[0].Value, product_select[4].Value, false); } } else { MessageBox.Show("Seleccione todo el registro para eliminar", "Agregar MP", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void sgc_prov_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { proveedor = sgc_prov.PrimaryGrid.GridPanel.GetSelectedRows().GetCells(); if (proveedor.Count != 0) { this.Close(); } }
private void sdgvMonitor_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { try { GridRow gRow = ((GridRow)e.GridRow); DataTable dtMachine = GV.MSSQL1.BAL_ExecuteQuery("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT M.MachineID, L.WHO AS [User],M.HostName AS Host,M.IP,M.Status, M.SystemState,RDPPort,S.PROJECT_NAME AS 'Project Name',L.PROJECTID AS 'Project ID', M.LastUpdatedDate, L.USERTYPE AS Level, L.RESEARCHTYPE AS 'Access To',L.SESSIONID AS Session, M.CMVersion AS Version FROM c_machines AS M INNER JOIN c_log L ON M.LastSession = L.SESSIONID INNER JOIN c_project_settings S ON M.LASTLOGGEDPROJECTID = S.PROJECT_ID WHERE L.ACTION='Project LoggedIn' AND M.MachineID='" + gRow.Cells["MachineID"].Value + "';"); if (dtMachine.Rows[0]["Status"].ToString() == "Online") { if (!GM.IsFormExist("frmScreen")) { using (frmScreen objfrmScreen = new frmScreen()) { if (dtMachine.Rows[0]["SystemState"].ToString() == "" || dtMachine.Rows[0]["SystemState"].ToString() == "SessionUnlock") { using (System.Diagnostics.Process p = new System.Diagnostics.Process()) { p.StartInfo.FileName = GV.sScreenAddonPath; p.StartInfo.Arguments = dtMachine.Rows[0]["IP"].ToString() + " " + dtMachine.Rows[0]["RDPPort"].ToString() + " Pr@k@sH"; p.StartInfo.UseShellExecute = false; p.StartInfo.CreateNoWindow = true; p.Start(); } //System.Diagnostics.Process.Start(GV.sScreenAddonPath + " " + dtMachine.Rows[0]["IP"].ToString() + " " + dtMachine.Rows[0]["RDPPort"].ToString() + " Pr@k@sH"); //objfrmScreen.IP = dtMachine.Rows[0]["IP"].ToString(); //objfrmScreen.Port = dtMachine.Rows[0]["RDPPort"].ToString(); //objfrmScreen.Agent = gRow.Cells["User"].Value.ToString(); //objfrmScreen.Project = gRow.Cells["Project Name"].Value.ToString(); //objfrmScreen.ShowDialog(); } else { ToastNotification.Show(this, "System not active. State : " + dtMachine.Rows[0]["SystemState"].ToString(), eToastPosition.TopRight); } //string sMessage = objfrmScreen.StartSession(); //if (sMessage.Length > 0) //{ // objfrmScreen.Close(); // Reload(); // ToastNotification.Show(this, "Error connecting Machine", eToastPosition.TopRight); //} } } } else { LoadTable(); ToastNotification.Show(this, "Machine is not online", eToastPosition.TopRight); } } catch (Exception ex) { GM.Error_Log(System.Reflection.MethodBase.GetCurrentMethod(), ex, true, false); } }
private void sdgvEmails_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { try { GridRow GRow = (GridRow)e.GridRow; string sID = GRow[1].Value.ToString(); if (sID.Length > 0) { GM.OpenContactUpdate(sID, false, true, this, null); } } catch (Exception ex) { GM.Error_Log(System.Reflection.MethodBase.GetCurrentMethod(), ex, true, true); } }
private void SuperGridPostPanel_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { //取得點選的RowIndex CurrentRowIndexofPostPanel = e.GridRow.Index; CurrentSelPostName = PostPanel.GetCell(CurrentRowIndexofPostPanel, 0).Value.ToString(); //將選到的後處理器填入OperPanel中 foreach (string SelectOper in ListSelOper) { for (int i = 0; i < OperationObj.Length; i++) { if (SelectOper == OperationObj[i].Name) { OperPanel.GetCell(i, 2).Value = CurrentSelPostName; } } } }
private void superGridControl1_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { // SelectedElementCollection col = this.superGridControl1.PrimaryGrid.GetSelectedRows(); // SelectedElementCollection s = superGridControl1.GetSelectedRows(); // // GridContainer dh=e.GridRow.Index; // int dd = e.GridRow.Index;//Get the number of rows selected is from the beginning of 0 // // MessageBox.Show(dd.ToString()); // // GridRow g= col[dd] as GridRow; // //MessageBox.Show(g.Cells[0].Value.ToString()); //// if (col.Count > 0) // //{ // GridRow r = col[1] as GridRow; // //MessageBox.Show(r.Cells[0].Value.ToString()); // MessageBox.Show(r.RowHeaderText); // //} // //GridRow r = col[0] as GridRow; // //MessageBox.Show(r.Cells[0].Value.ToString()); }
/// <summary> /// Handle row level InfoImage double-clicks /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SuperGridControl1RowInfoDoubleClick( object sender, GridRowDoubleClickEventArgs e) { GridRow row = e.GridRow as GridRow; if (row != null) { // Just simply change every cell to have the average // value needed to total 100 int avg = 100 / row.Cells.Count; int step = 100 % row.Cells.Count; for (int i = 0; i < row.Cells.Count; i++) { row.Cells[i].Value = (double)(avg + (i < step ? 1 : 0)); } row.InfoText = null; } }
/// <summary> /// 预警一览 行双击 /// Created:20170609(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void superGridWarning_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { SuperGridControl obj = (SuperGridControl)sender; string WorkType = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 1).Value.ToString(); MainFrame mainForm = (MainFrame)this.Parent.TopLevelControl; switch (WorkType) { case "项目交付物预警": CurrentNode = new WBSBLL().GetNode(e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 4).Value.ToString()); mainForm.RelaodTree(); mainForm.OpenNormalOperation(); break; case "项目问题预警": Forms.Others.Trouble form = new Forms.Others.Trouble(""); form.TroubleId = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 4).Value.ToString(); mainForm.ShowChildForm(form); break; } }
/// <summary> /// 双击近期工作和问题一览时 /// Created:20170609(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void superGridLastWork_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { GridCell cell = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 5); if (cell != null) { string WorkType = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 1).Value.ToString(); MainFrame mainForm = (MainFrame)this.Parent.TopLevelControl; if (WorkType == "日常工作") { Forms.Others.Routine form = new Forms.Others.Routine(""); form.WorkId = cell.Value.ToString(); mainForm.ShowChildForm(form); } else { Forms.Others.Trouble form = new Forms.Others.Trouble(""); form.TroubleId = cell.Value.ToString(); mainForm.ShowChildForm(form); } } }
private void sgc_mp_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { agregarMP(); }
private void sgc_detalle_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { quitarMP(); }
private void sdgvCallLog_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { Clipboard.SetText(((GridRow)e.GridRow).Cells[4].Value.ToString()); ToastNotification.Show(this, "Number :" + ((GridRow)e.GridRow).Cells[4].Value + " is copied"); }
private void sdgvSearch_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { btnSubmit.PerformClick(); }
private void sgcStkOut_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { tsbEdit_Click(sender, e); }
private void grid_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { ViewFile(); }