private void gridView_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { ro_Empleado_Info oFila = new ro_Empleado_Info(); oFila = (ro_Empleado_Info)gridView.GetRow(e.RowHandle); //VALIDA QUE EL VALOR SEA MAYOR QUE CERO if (oFila.SueldoActual > 0 && (oFila.SueldoActual >= oFila.em_sueldoBasicoMen)) { if ((bool)gridView.GetFocusedRowCellValue(colcheck)) { // gridView.SetFocusedRowCellValue(colSueldoActual, 0); gridView.SetFocusedRowCellValue(colcheck, false); } else { gridView.SetFocusedRowCellValue(colcheck, true); } } } catch (Exception ex) { MessageBox.Show(ex.Message); Log_Error_bus.Log_Error(ex.Message); } }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (gridView1.FocusedRowHandle < 0) { return; } DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle); DataTable dtNot = DB.GetData(@"SELECT pkFirmaOzelNot ,OzelNot FROM FirmaOzelNot with(nolock) where fkFirma=" + dr["pkFirma"].ToString()); if (dtNot.Rows.Count == 0) { memoozelnot.Tag = "0"; memoozelnot.Text = ""; } else { memoozelnot.Tag = dtNot.Rows[0]["pkFirmaOzelNot"].ToString(); memoozelnot.Text = dtNot.Rows[0]["OzelNot"].ToString(); } dtNot.Dispose(); }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { int x = gridView2.RowCount; string[] cell = new string[x]; for (int i = 0; i < x; i++) { cell[i] = gridView2.GetRowCellValue(i, "operation_name").ToString(); } var xxxx = repositoryItemLookUpEdit1.GetDataSourceRowByDisplayValue("machine_id"); foreach (Button item in panel1.Controls) { if (cell.Contains(item.Text)) { item.BackColor = Color.Red; } } //for (int i = 0; i < cell.Length; i++) //{ // if (panel1.Controls.Text = cell[i]) // { // item.BackColor = Color.Blue; // } //} }
/// <summary> /// 双击打开中间计量表 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gvPrjAmountWbsRpt_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (e.Clicks >= 2) { PrjAmountWbsRpt datasource = gvPrjAmountWbsRpt.GetRow(e.RowHandle) as PrjAmountWbsRpt; if (datasource != null && !String.IsNullOrEmpty(datasource.WbsLineNo)) { DoWorkRun("读取数据中,请稍候......", "读取数据", () => { PrjAmountWbsRpt result = client.GetWbsRpt(datasource.WbsLineNo, datasource.PrjamountNo); return(result); }, (result, ex) => { if (ex == null) { PrjAmountWbsRptDetailForm form = new PrjAmountWbsRptDetailForm(); form.DataSource = result as PrjAmountWbsRpt; AppForm.CurrentForm.ChangeForm(String.Format("{0}-中间计量表", (result as PrjAmountWbsRpt).WbsLineName), form); } }); } } }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewPrReqList_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmPrReq"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string prReqNoStr = DataTypeConvert.GetString(gridViewPrReqList.GetFocusedDataRow()["PrReqNo"]); int autoIdInt = DataTypeConvert.GetInt(gridViewPrReqList.GetFocusedDataRow()["AutoId"]); FrmPrReq.queryPrReqNo = prReqNoStr; FrmPrReq.queryListAutoId = autoIdInt; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + tsmiSjcx.Text, ex); } }
private void gridView2_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { dh.ID = int.Parse(gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "ID").ToString()); dh.NGAY = DateTime.Parse(gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "NGAY").ToString()); dh.IDNCC = int.Parse(gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "IDNCC").ToString()); dh.IDNV = int.Parse(gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "IDNV").ToString()); dh.GHICHU = gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "GHICHU").ToString(); dh.TINHTRANG = Convert.ToBoolean(gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "TINHTRANG").ToString()); if (dh.GHICHU != "Đã nhập" && dh.TINHTRANG == false) { nhap.Enabled = true; cleardh.Enabled = true; } else { nhap.Enabled = false; cleardh.Enabled = false; } } catch (Exception ex) { MessageBox.Show("Gặp lỗi!\n" + ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void gridViewShift_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { //gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "OperatorId").ToString(); XtraUserControl shiftUserControl = new userControlShifts(); shiftUserControl.Show(); }
private void OnApprovedOrderRowClicked(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { GridView gv = (GridView)sender; BLL.Order or = new BLL.Order(); _orderID = Convert.ToInt32(gv.GetFocusedDataRow()["ID"].ToString()); order.LoadByPrimaryKey(_orderID); // populate the general order variables txtPickListFromStore.Text = order.GetFromStore(); txtPickListRequestedBy.Text = order.GetRequestedBy(); txtPickListOrderNumber.Text = order.RefNo; txtPickListApprovedBy.Text = order.GetApprovedBy(); if (order.OrderStatusID == OrderStatus.Constant.ORDER_APPROVED) { progressBarControl.Properties.Maximum = order.CountOfDetailItems(); progressBarControl.Properties.DisplayFormat.FormatString = "{0: #,##0}" + string.Format(" of {0}", progressBarControl.Properties.Maximum); progressBarControl.Properties.DisplayFormat.FormatType = FormatType.Custom; progressBarControl.EditValue = 0; this.Enabled = false; progressBarControl.Visible = true; bgWorker.RunWorkerAsync(_orderID); } }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { int[] selRows = ((GridView)gridControl1.MainView).GetSelectedRows(); DataRowView selRow = (DataRowView)(((GridView)gridControl1.MainView).GetRow(selRows[0])); try { this.textEditMaMon.Text = selRow[config.MONAN_MAMON].ToString(); this.textEditTenMon.Text = selRow[config.MONAN_TENMON].ToString(); this.textEditSoLuong.Text = selRow[config.MONAN_SOLUONG_DANGCO].ToString(); this.textEditDonGia.Text = selRow[config.MONAN_DONGIA].ToString(); this.lookUpEditNhomMon.Text = selRow[config.MONAN_MANHOM].ToString(); this.textEditHinhAnh.Text = selRow[config.MONAN_HINHANH].ToString(); try { if (this.textEditHinhAnh.Text != "") { string imagePath = config.GetProjectLinkDirectory() + config.MONAN_IMAGE_RESOURCE + this.textEditHinhAnh.Text; this.pictureEditMonAn.Image = Image.FromFile(imagePath); } else { string imagePath = config.GetProjectLinkDirectory() + config.MONAN_IMAGE_RESOURCE + @"1.png"; this.pictureEditMonAn.Image = Image.FromFile(imagePath); } } catch { } } catch { } }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { textBox1.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ID").ToString(); textBox2.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "LOAISP").ToString(); textBox3.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TENSP").ToString(); textBox4.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NSX").ToString(); textBox5.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SL").ToString(); textBox6.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DG").ToString(); richTextBox1.Text = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GHICHU").ToString(); sp.ID = int.Parse(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ID").ToString()); sp.LOAISP = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "LOAISP").ToString(); sp.TENSP = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TENSP").ToString(); sp.NSX = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NSX").ToString(); int sl = int.Parse(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SL").ToString()); sp.SL = sl; int dgm = int.Parse(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DG").ToString()); sp.DG = dgm; sp.GHICHU = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GHICHU").ToString(); sp.TINHTRANG = Convert.ToBoolean(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TINHTRANG").ToString()); if (sp.TINHTRANG) { khoasp.Enabled = true; } else { khoasp.Enabled = false; } } catch (Exception ex) { MessageBox.Show("Gặp lỗi!\n" + ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void gvFlow_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { var baseUrl = BP.SystemConfig.AppSettings["BaseUrl"]; if (e.Button == MouseButtons.Left) { //this.Hide(); var flow_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["FK_Flow"]); var work_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["WorkID"]); var node_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["FK_Node"]); BP.WF.Node n = new BP.WF.Node(node_id.ToString()); var url = ""; if (n.IsStartNode) { url = baseUrl + "/WF/MyFlowSmall.aspx?FK_Flow=" + flow_id + "&FK_Node=" + node_id + "&userNo=" + BP.Web.WebUser.No + ""; } else { url = baseUrl + "/WF/MyFlowSmall.aspx?FK_Flow=" + flow_id + "&FK_Node=" + node_id + "&FID=0&WorkID=" + work_id + "&IsRead=0&userNo=" + BP.Web.WebUser.No + ""; } FlowBrowserForm f = new FlowBrowserForm(url); f.StartPosition = FormStartPosition.CenterScreen; f.Tag = "process"; f.ShowDialog(); } }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { // DataRow rows;// = new ArrayList(); // string serial = ""; // GridView view = (GridView)sender; // GridHitInfo info = view.CalcHitInfo(e.Location); // if (info.InRow || info.InRowCell) // { // rows = view.GetDataRow(info.RowHandle); //foreach (BCAPINVOICESUB val in rows) //{ // serial = rows["SERIALNO"].ToString(); //} // Add the selected rows to the list. //if (view.FocusedRowHandle < 0) // return; //foreach (int index in gridView1.GetSelectedRows()) //{ // rows.Add(gridView1.GetRow(index)); //} //if (rows.Count > 0) //{ // foreach (BCAPINVOICESUB val in rows) // { // serial = val.SERIALNO; // } //} //UpdateBcapinvoice(serial); //scanbar = String.Empty; //} }
private void GV_Main_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (e.Button == MouseButtons.Right) { TabControlMain.SelectedTabPageIndex = 0; } }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (e.Button == MouseButtons.Right) { this.contextMenuStrip1.Show(this.gridControl1, e.Location); } }
private void dgv_Main_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { int focus = dgv_Main.FocusedRowHandle; if (focus >= 0) { ID = dgv_Main.GetDataRow(focus)["ID"].ToString(); txtUserName.Text = dgv_Main.GetDataRow(focus)["UserName"].ToString(); txtMatKhau.Text = dgv_Main.GetDataRow(focus)["Password"].ToString(); txtNhapLaiMatKhau.Text = dgv_Main.GetDataRow(focus)["Password"].ToString(); txtTenUser.Text = dgv_Main.GetDataRow(focus)["Name"].ToString(); cbbNhomQuyen.EditValue = dgv_Main.GetDataRow(focus)["RoleGroup"]; txtTenUser.Text = dgv_Main.GetDataRow(focus)["Name"].ToString(); txtDiaChi.Text = dgv_Main.GetDataRow(focus)["Address"].ToString(); txtEmail.Text = dgv_Main.GetDataRow(focus)["Email"].ToString(); txtSDT.Text = dgv_Main.GetDataRow(focus)["Phone"].ToString(); txtTrangThai.Checked = bool.Parse(dgv_Main.GetDataRow(focus)["Status"].ToString()); cbbTrangThaiDangNhap.EditValue = bool.Parse(dgv_Main.GetDataRow(focus)["IsLogin"].ToString()); MatKhauOld = dgv_Main.GetDataRow(focus)["Password"].ToString(); } } catch { } }
/// <summary> /// 材料耗用清单行数据行单击 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gvUsedMaterialListMain_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { this.gcUseMaterialList.DataSource = null; State = ControlState.Read; OnAfterStateChanged(State); UseMaterial _material = new UseMaterial(); DataTable dt = new DataTable(); string key = gvUsedMaterialListMain.GetFocusedRowCellValue("MATERIAL_USED_DETAIL_KEY").ToString(); dt = _material.GetMaterialDetailByKey(key).Tables[0]; gcUseMaterialList.DataSource = _material.GetMaterialDetailByKey(key).Tables[0]; txtMaterialLot.Text = dt.Rows[0]["MATERIAL_LOT"].ToString(); cmbOperationName.Text = gvUsedMaterialListMain.GetFocusedRowCellValue("ROUTE_OPERATION_NAME").ToString(); //cmbOperationName.Text = dt.Rows[0]["ROUTE_OPERATION_NAME"].ToString(); //cmbFactoryRoom.EditValue = gvUsedMaterialListMain.GetFocusedRowCellValue("LOCATION_NAME").ToString(); cmbFactoryRoom.EditValue = dt.Rows[0]["LOCATION_KEY"].ToString(); //cmbEquipmentName.EditValue = gvUsedMaterialListMain.GetFocusedRowCellValue("EQUIPMENT_NAME").ToString(); cmbEquipmentName.EditValue = dt.Rows[0]["EQUIPMENT_KEY"].ToString(); cmbShiftName.EditValue = dt.Rows[0]["SHIFT_NAME"].ToString(); txtUseDateTime.Text = dt.Rows[0]["USED_TIME"].ToString(); txtOperator.Text = dt.Rows[0]["OPERATOR"].ToString(); //modi by chao.pang 来料接收程序修改引发的只记录材料批次号,不扣减数量 gvMain.Columns[9].OptionsColumn.AllowEdit = false; gvMain.Columns[10].OptionsColumn.AllowEdit = false; }
/// <summary> /// 双击查询明细 /// </summary> private void gridViewStnSummaryList_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { if (e.Clicks == 2 && e.Button == MouseButtons.Left) { string formNameStr = "FrmStnSummary"; if (!commonDAO.QueryUserFormPower(formNameStr)) { return; } string autoQuotationNoStr = DataTypeConvert.GetString(gridViewStnSummaryList.GetFocusedDataRow()["AutoQuotationNo"]); //string ssNoStr = DataTypeConvert.GetString(gridViewStnSummaryList.GetFocusedDataRow()["SSNo"]); int stnSummaryListAutoIdInt = DataTypeConvert.GetInt(gridViewStnSummaryList.GetFocusedDataRow()["AutoId"]); int listModuleAutoIdInt = DataTypeConvert.GetInt(gridViewStnSummaryList.GetFocusedDataRow()["ListModuleAutoId"]); FrmStnSummary.queryAutoQuotationNoStr = autoQuotationNoStr; //FrmStnSummary.querySSNoStr = ssNoStr; FrmStnSummary.queryStnSummaryListAutoIdInt = stnSummaryListAutoIdInt; FrmStnSummary.queryListModuleAutoIdInt = listModuleAutoIdInt; ViewHandler.ShowRightWindow(formNameStr); } } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--双击查询明细错误。", ex); } }
private void gv_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (dble) { try { var row = gv.GetFocusedRow() as filen; if (row == null) { return; } //string a1 = md5.Decrypt(row.key); byte[] filedata = row.data.ToArray(); string tmpPath = Application.StartupPath + "\\tmp"; if (!Directory.Exists(tmpPath)) { Directory.CreateDirectory(tmpPath); } string tmpFile = tmpPath + "\\" /* + a1 */ + row.name; File.WriteAllBytes(tmpFile, filedata); Process.Start(tmpFile); } catch (Exception ex) { XtraMessageBox.Show(ex.ToString(), "Error"); } } }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (gridView1.FocusedRowHandle >= 0 && gridView1.FocusedRowHandle <= gridView1.RowCount - 1) { model.IDX = string.IsNullOrEmpty(gridView1.GetFocusedRowCellValue("idx").ToString( )) == true ? 0 : Convert.ToInt32(gridView1.GetFocusedRowCellValue("idx").ToString( )); assignMent( ); } }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { var id = (sender as GridView).GetFocusedRowCellValue("doanhthuID"); //textEdit1.EditValue = (sender as GridView).GetFocusedRowCellValue("chiphiID"); //MessageBox.Show("ok,"+abc); LoadDataByDoanhThuID((int)id); DisableEditColumnsGridView.CustomEditColumnsGridView(gridView2, new int[] { 0, 1, 2 }); }
private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (e.Button == MouseButtons.Right) { int i = this.gridView1.FocusedRowHandle; //MessageBox.Show(string.Format("将要操作 第{0}行", i)); Console.WriteLine(string.Format("将要操作 第{0}行", i)); } }
private void gvSectionCal_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { rowclk = true; if (gvSectionCal.GetRowCellValue(gvSectionCal.FocusedRowHandle, gvSectionCal.Columns["enddate"]) != null) { theEndDate = gvSectionCal.GetRowCellValue(gvSectionCal.FocusedRowHandle, gvSectionCal.Columns["enddate"]).ToString(); } }
private void GridViewRowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { UnEnableButton(); if (e.Button == MouseButtons.Right) { var p = new Point(Cursor.Position.X, Cursor.Position.Y); popupMenu1.ShowPopup(p); } _id = gridView1.GetRowCellValue(e.RowHandle, "Id").ToString(); }
private void gvBangGia_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { DataRow dataRow = gvBangGia.GetDataRow(e.RowHandle); if (dataRow != null) { bangGiaID = dataRow["Banggiaid"].ToString(); setDataSourceBangGiaCT(bangGiaID); } }
private void gridView2_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { GridView gridView = sender as GridView; txtMixOutId.Text = gridView.GetRowCellValue(gridView.FocusedRowHandle, gridView.Columns["Id"]).ToString(); txtPosted.Text = gridView.GetRowCellValue(gridView.FocusedRowHandle, gridView.Columns["Posted"]).ToString(); cmbMixId.EditValue = gridView.GetRowCellValue(gridView.FocusedRowHandle, gridView.Columns["MixRawId"]); SetcmdPost(); }
private void gvNhomSanPham_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { DataRow dataRow = gvNhomSanPham.GetDataRow(e.RowHandle); if (dataRow != null) { maNhomSPId = dataRow["Manhomspid"].ToString(); setDataSourceSanPham(maNhomSPId); } }
private void gvVideo_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (gvVideo.FocusedRowHandle >= 0) { var videoView = gvVideo.GetFocusedRow() as View.Video; cboVideoLayer.Text = videoView.VideoObj.Layer.ToString(); txtVideo.Text = videoView.VideoObj.VideoPath; ckVideoLoop.Checked = videoView.VideoObj.Loop; } }
private void UiVistaClase_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { var clase = (Clase)UiVistaClase.GetRow(e.RowHandle); if (Clase.CLASS_ID != clase.CLASS_ID) { UsuarioDeseaObtenerClase?.Invoke(sender, new ClaseArgumento { Clase = clase }); } }
//Grid view e click oldugunda edit ve delete islemlerini yapabilirsiniz private void GridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { //tiklanan row un employee id si int employeeId = Convert.ToInt32((sender as GridView).GetFocusedRowCellValue("EmployeeID")); CreateOrEditEmployeeForm editEmployeeForm = CreateOrEditEmployeeForm.GetInstance(); editEmployeeForm.Show(); this.Hide(); editEmployeeForm.SetEmployeeId(employeeId); }
private void gridView_OdaDemirbaslari_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { int demirbasOdaNo = Convert.ToInt32(gridView_OdaDemirbaslari.GetRowCellValue(gridView_OdaDemirbaslari.FocusedRowHandle, "DemirbasOdaId").ToString()); string demirbasAdi = gridView_OdaDemirbaslari.GetRowCellValue(gridView_OdaDemirbaslari.FocusedRowHandle, "DemirbasAdi").ToString(); DialogResult sonuc = MessageBox.Show(demirbasAdi + " Demirbaşı Silinsin Mi?", "Uyarı !", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (sonuc == DialogResult.Yes) { DemirbasOdaKisiController.OdaDemirbasSil(demirbasOdaNo); GetValue(); } }