void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e) { if (e.Column.HeaderText == "FoodType") { e.Row.Cells["Food"].Value = null; } }
private void MasterTemplate_CellDoubleClick(object sender, GridViewCellEventArgs e) { //Open Planning Status_Detail var p = new PlanningStatus_Detail(); p.ShowDialog(); }
void grdLister_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (grdLister.CurrentRow != null && grdLister.CurrentRow is GridViewRowInfo) { ViewDetailForm(); } }
private void grdDatos_CellEndEdit_1(object sender, GridViewCellEventArgs e) { try { decimal valor = 0; decimal pond = 0; decimal Suma = 0; decimal total = 0; if (grdDatos.Columns[e.ColumnIndex].Name == "Valor") { foreach (GridViewRowInfo row in grdDatos.Rows) { // Producto de las columnas nivel y valor valor = decimal.Parse(row.Cells["Tipo"].Value.ToString()); pond = decimal.Parse(row.Cells["Valor"].Value.ToString()); total = valor * pond; row.Cells["Total"].Value = total; Suma += Convert.ToDecimal(row.Cells["Total"].Value); } resultado = Suma * decimal.Parse(txtValor.Text); } txtSueldo.Text = resultado.ToString(); } catch (Exception) { throw; } }
private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e) { if (digit == 0) { radGridView1.Rows[7].Cells[2].Value = 2; digit = 1; radLabel2.Text = "Всего часов в семестр: 398"; radLabel3.Text = "Всего часов в неделю: 26"; radLabel4.Text = "Всего пар в неделю: 13"; return; } if (digit == 1) { radGridView1.Rows[8].Cells[2].Value = 5; digit = 2; radLabel2.Text = "Всего часов в семестр: 476"; radLabel3.Text = "Всего часов в неделю: 31"; radLabel4.Text = "Всего пар в неделю: 15"; return; } if (digit == 2) { radGridView1.Rows[9].Cells[2].Value = 6; radLabel2.Text = "Всего часов в семестр: 576"; radLabel3.Text = "Всего часов в неделю: 36"; radLabel4.Text = "Всего пар в неделю: 18"; } }
private void ItemsRadGridView_CellClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } if (this._seachForm == SearchEnum.SEARCH_CUSTOMER) { int valor = (Int32)ItemsRadGridView.Rows[e.RowIndex].Cells["CustomerID"].Value; foreach (var item in listOfCustomer) { if (item.CustomerID == valor) { _currentCustomer = item; break; } } } else if (this._seachForm == SearchEnum.SEARCH_PRODUCT) { int valor = (Int32)ItemsRadGridView.Rows[e.RowIndex].Cells["ProductID"].Value; foreach (var item in listOfProduct) { if (item.ProductID == valor) { _currentProduct = item; break; } } } //this.ItemsRadGridView.Rows[e.RowIndex].Cells["ProductID"].Value; }
private void RadGridView1_CellValueChanged(object sender, GridViewCellEventArgs e) { //var currentMethod = this.radGridView1.CurrentRow.Cells[3].Value; //if (currentMethod == null) // return; //UpdateSwitchPointValue(currentMethod.ToString()); }
void VirtualRadGridView_CellEndEdit(object sender, GridViewCellEventArgs e) { if (e.Row is GridViewFilteringRowInfo) { this.PerformFilter(); } }
private void CellDoubleClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } var template = e.Column.OwnerTemplate; if (template is MasterGridViewTemplate) { return; } else { if (isLeftClick == 1 && e.ColumnIndex == 2) { var order = e.Row.DataBoundItem as OrderTemplate; if (order != null) { selectedId = order.CustomerId; } var newCustomer = new CustomerForm(selectedId, currentUser) { Dock = DockStyle.Fill, MaximizeBox = true }; newCustomer.ShowDialog(); RefreshItems(sender, e); } } }
public override NSView GetViewForItem(NSTableView tableView, NSTableColumn tableColumn, int row, NSObject obj, Func <NSObject, int, object> getItem) { var view = tableView.MakeView(tableColumn.Identifier, tableView) as CellView; if (view == null) { view = new CellView { Title = string.Empty }; view.Identifier = tableColumn.Identifier; view.SetButtonType(NSButtonType.Switch); view.Bind("enabled", tableColumn, "editable", null); var col = Array.IndexOf(tableView.TableColumns(), tableColumn); view.Activated += (sender, e) => { var control = (CellView)sender; var r = (int)control.Tag; var item = getItem(control.Item, r); var ee = new GridViewCellEventArgs(ColumnHandler.Widget, r, col, item); ColumnHandler.DataViewHandler.Callback.OnCellEditing(ColumnHandler.DataViewHandler.Widget, ee); SetObjectValue(item, control.ObjectValue); control.ObjectValue = GetObjectValue(item); ColumnHandler.DataViewHandler.Callback.OnCellEdited(ColumnHandler.DataViewHandler.Widget, ee); }; } view.Tag = row; view.Item = obj; var args = new MacCellFormatArgs(ColumnHandler.Widget, getItem(obj, row), row, view); ColumnHandler.DataViewHandler.OnCellFormatting(args); return(view); }
private void gridAgents_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (!Control.ModifierKeys.HasFlag(Keys.Alt)) { ActivateSelectedAgents(); } else if (e.Row is GridViewDataRowInfo) { var row = (DataRowView)e.Row.DataBoundItem; if (row != null) { Task.Run( async() => { var result = await AgentBroker.Instance.TryExecuteOnOne <IAgent, string>((string)row["id"], a => a.ConfigurationFilePath, ignoreAgentState: true).ConfigureAwait(false); if (result.IsSuccessful && !string.IsNullOrEmpty(result.Result)) { Process.Start(new ProcessStartInfo(result.Result) { UseShellExecute = true }); } }); } } }
private void RadGridView1_CellEndEdit(object sender, GridViewCellEventArgs e) { //结束编辑,记录下value;与编辑前比较,值改变则执行修改 var typeNo = this.radGridViewBind.CurrentRow.Cells[1].Value; var materialPN = this.radGridViewBind.CurrentRow.Cells[2].Value; var describle = this.radGridViewBind.CurrentRow.Cells[3].Value; if (typeNo == null || materialPN == null || describle == null) { return; } if (materialPN.ToString().Contains("(")) { materialPN = materialPN.ToString().Substring(0, materialPN.ToString().IndexOf('(')); } if (materialPN.ToString() != keyMaterialCode || typeNo.ToString() != keyTypeNo || this.keyDescrible != describle.ToString()) { ProductMaterial productMaterial = new ProductMaterial(); productMaterial.keyMaterialCode = keyMaterialCode; productMaterial.keyTypeNo = keyTypeNo; pmListTemp.Add(productMaterial); } }
private void MasterTemplate_CellDoubleClick(object sender, GridViewCellEventArgs e) { try { if (screen.Equals(1)) { if (e.RowIndex > -1) { if (!Convert.ToString(e.Row.Cells["ShippingNo"].Value).Equals("")) { SHNo_tt.Text = Convert.ToString(e.Row.Cells["ShippingNo"].Value); this.Close(); } else { SHNo_tt.Text = Convert.ToString(e.Row.Cells["ShippingNo"].Value); CodeNo_tt.Text = Convert.ToString(e.Row.Cells["CodeNo"].Value); this.Close(); } } } else { if (e.RowIndex > -1) { Acciden_t_Slip_CutStock a = new Acciden_t_Slip_CutStock(Convert.ToString(e.Row.Cells["ShippingNo"].Value), Convert.ToString(e.Row.Cells["CodeNo"].Value)); a.ShowDialog(); //this.Close(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void radGridView1_CellClick(object sender, GridViewCellEventArgs e) { if (e.Column.Name == " ") { DEL_ATTACHMENT(null, null); } }
private void dgvData_CellDoubleClick(object sender, GridViewCellEventArgs e) { try { if (e.RowIndex > -1) { if (dgvData.Rows.Count > 0) { if (screen.Equals(1)) { //DateTime? Date = DateTime.Today; string yyyyMM = ""; yyyyMM = Convert.ToDateTime(e.Row.Cells["CreateDate"].Value).ToString("yyyyMM"); if (Convert.ToInt32(yyyyMM) >= Convert.ToInt32(DateTime.Today.ToString("yyyyMM"))) { RCNo_tt.Text = Convert.ToString(e.Row.Cells["InvoiceNo"].Value); this.Close(); } else { MessageBox.Show("ไม่สามารถทำการคืนรายการรับเข้าย้อนหลังข้ามเดือนได้"); } } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// gridview点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <remarks></remarks> private void GridView1_CellClick(object sender, GridViewCellEventArgs e) { try { switch (TextTabBar1.SelectItemIndex) { case 0: frmOperationalRDetail frm1 = new frmOperationalRDetail(); this.Redirect(frm1, (MobileForm form, object args) => { if (frm1.ShowResult == Smobiler.Core.ShowResult.Yes) { Bind(); } }); break; case 1: frmOperationalREdit frm = new frmOperationalREdit(); this.Redirect(frm, (MobileForm form, object args) => { if (frm.ShowResult == Smobiler.Core.ShowResult.Yes) { Bind(); } }); break; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void grdDriverRent_CellEndEdit(object sender, GridViewCellEventArgs e) { //try //{ // decimal RentPay = grdDriverRent.CurrentRow.Cells["RentPay"].Value.ToDecimal(); // decimal DriverRent = grdDriverRent.CurrentRow.Cells["DriverRent"].Value.ToDecimal(); // decimal InitialBalance = grdDriverRent.CurrentRow.Cells["InitialBalance"].Value.ToDecimal(); // decimal Balance = -(DriverRent - InitialBalance); // decimal DriverBalance = grdDriverRent.CurrentRow.Cells["Balance"].Value.ToDecimal(); // decimal Current = 0; // if (RentPay > 0) // { // if (DriverBalance != 0) // { // Current = (RentPay + (-DriverRent) + (DriverBalance)); // e.Row.Cells[COLS.CurrentBalance].Value = Current; // } // else // { // Current = (RentPay + (-DriverRent) + (InitialBalance)); // e.Row.Cells[COLS.CurrentBalance].Value = Current; // } // } //} //catch (Exception ex) //{ //} }
private void RdGrdExcelColumns_CellDoubleClick(object sender, GridViewCellEventArgs e) { try { if (e.Column.FieldName == "cExcelCol_2") { if (DtExcelColumns != null && DtExcelColumns.DefaultView.Count > 0) { if (DtExcelColumns_2 != null && DtExcelColumns_2.DefaultView.Count > 0) { int IRowIndex = 0; IRowIndex = RdGrdExcelColumns.CurrentRow.Index; DtExcelColumns.DefaultView[IRowIndex].BeginEdit(); DtExcelColumns.DefaultView[IRowIndex]["cExcelCol_2"] = ""; DtExcelColumns.DefaultView[IRowIndex].EndEdit(); DtExcelColumns.AcceptChanges(); } } } } catch (Exception ex) { ClsMessage.ProjectExceptionMessage(ex); } }
private void RadGridView1CellDoubleClick(object sender, GridViewCellEventArgs e) { if (e.Row.Cells[0].Value.ToString().Length > 2) { ViewChart(e.Row.Cells[0].Value.ToString()); } }
private void MasterTemplate_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex > -1) { btnSave_Click(null, null); } //try //{ // if (screen.Equals(1)) // { // if (!Convert.ToString(e.Row.Cells["ShippingNo"].Value).Equals("")) // { // SHNo_tt.Text = Convert.ToString(e.Row.Cells["ShippingNo"].Value); // this.Close(); // } // else // { // SHNo_tt.Text = Convert.ToString(e.Row.Cells["ShippingNo"].Value); // CodeNo_tt.Text = Convert.ToString(e.Row.Cells["CodeNo"].Value); // this.Close(); // } // } // else // { // Shipping a = new Shipping(Convert.ToString(e.Row.Cells["ShippingNo"].Value), // Convert.ToString(e.Row.Cells["CodeNo"].Value)); // a.ShowDialog(); // this.Close(); // } //} //catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void radGridView1_CellDoubleClick(object sender, GridViewCellEventArgs e) { try { radGridView1.CellDoubleClick -= radGridView1_CellDoubleClick; RadElement radElement = radGridView1.ElementTree.GetElementAtPoint(_point); if ((!(radElement is GridDataCellElement)) || (radGridView1.CurrentCell == null)) { return; } ViewChart(!radGridView1.CurrentCell.RowInfo.Cells[0].ColumnInfo.Name.Equals("Symbol") ? radGridView1.CurrentCell.RowInfo.Cells[6].Value.ToString() : radGridView1.CurrentCell.RowInfo.Cells[0].Value.ToString()); } catch (Exception ex) { } finally { radGridView1.CellDoubleClick += radGridView1_CellDoubleClick; } }
// Show Data void grdLister_CellDoubleClick(object sender, GridViewCellEventArgs e) { // ViewDetailForm(); objMaster.GetByPrimaryKey(grdLister.CurrentRow.Cells["Id"].Value.ToInt()); DisplayRecord(); }
private void radGridViewExtended2_CellClick(object sender, GridViewCellEventArgs e) { int id = 0; Tbl_Name user = new Tbl_Name(); try { id = int.Parse(radGridViewExtended2.Rows[e.RowIndex].Cells["id"].Value.ToString()); user = ListData.Where(a => a.id == id).FirstOrDefault(); } catch { } if (e.ColumnIndex == 4) { txtB_id.Text = id.ToString(); txtB_Name.Text = user.name; txtB_Phone.Text = user.phone; button1.Text = "ویرایش"; isUpdate = true; } else if (e.ColumnIndex == 3) { DialogResult dialogResult = MessageBox.Show("آیا میخواهید حذف کنید", "سوال", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { ListData.Remove(user); radGridViewExtended2.DataSource = ""; radGridViewExtended2.DataSource = ListData; } } }
private void GrillaDevueltos_CellClick_1(object sender, GridViewCellEventArgs e) { var commandCell = (GridCommandCellElement)sender; var selectedRow = this.GrillaDevueltos.SelectedRows.FirstOrDefault(); if (selectedRow == null) { return; } var ventaDetalleDevolucion = selectedRow.DataBoundItem as VentaDetalleDevolucion; if (ventaDetalleDevolucion == null) { return; } switch (commandCell.ColumnInfo.Name) { case "ColumnaEliminar": EliminarDevolucion(ventaDetalleDevolucion); break; } }
private void radGridSiswa_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (button == "pembayaran") { TambahPembayaran pembayaran = new TambahPembayaran(); pembayaran.id = id; pembayaran.nama = nama; pembayaran.kelas = kelas; pembayaran.idTU=idTU; pembayaran.ShowDialog(); } else if (button == "pendaftaran") { TambahDaftar daftar = new TambahDaftar(); daftar.id = id; daftar.nama = nama; daftar.kelas = kelas; daftar.idTU = idTU; daftar.ShowDialog(); } else if (button == "tabungan") { TambahTabungan tabungan = new TambahTabungan(); tabungan.id = id; tabungan.nama = nama; tabungan.kelas = kelas; tabungan.idTU = idTU; tabungan.ShowDialog(); } }
void grdNotes_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (e.Row is GridViewDataRowInfo) { txtNotes.Text = e.Row.Cells[COL_NOTE.NOTES].Value.ToString(); } }
public override NSView GetViewForItem(NSTableView tableView, NSTableColumn tableColumn, int row, NSObject obj, Func <NSObject, int, object> getItem) { var view = tableView.MakeView(tableColumn.Identifier, tableView) as CellView; if (view == null) { view = new CellView(); view.Cell = new EtoLabelFieldCell { VerticalAlignment = VerticalAlignment.Center }; view.Identifier = tableColumn.Identifier; view.Selectable = false; view.DrawsBackground = false; view.Bezeled = false; view.Bordered = false; view.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; view.Cell.Wraps = false; view.Cell.Scrollable = true; view.Cell.UsesSingleLineMode = true; var col = Array.IndexOf(tableView.TableColumns(), tableColumn); view.BecameFirstResponder += (sender, e) => { var control = (CellView)sender; var r = (int)control.Tag; var item = getItem(control.Item, r); var ee = new GridViewCellEventArgs(ColumnHandler.Widget, r, (int)col, item); ColumnHandler.DataViewHandler.Callback.OnCellEditing(ColumnHandler.DataViewHandler.Widget, ee); }; view.EditingEnded += (sender, e) => { var notification = (NSNotification)sender; var control = (CellView)notification.Object; var r = (int)control.Tag; var item = getItem(control.Item, r); SetObjectValue(item, control.ObjectValue); var ee = new GridViewCellEventArgs(ColumnHandler.Widget, r, (int)col, item); ColumnHandler.DataViewHandler.Callback.OnCellEdited(ColumnHandler.DataViewHandler.Widget, ee); control.ObjectValue = GetObjectValue(item); }; view.ResignedFirstResponder += (sender, e) => { var control = (CellView)sender; var r = (int)control.Tag; var item = getItem(control.Item, r); SetObjectValue(item, control.ObjectValue); var ee = new GridViewCellEventArgs(ColumnHandler.Widget, r, (int)col, item); ColumnHandler.DataViewHandler.Callback.OnCellEdited(ColumnHandler.DataViewHandler.Widget, ee); }; view.Bind("editable", tableColumn, "editable", null); } view.Item = obj; view.Tag = row; var args = new MacCellFormatArgs(ColumnHandler.Widget, getItem(obj, row), row, view); ColumnHandler.DataViewHandler.OnCellFormatting(args); return(view); }
void grdSMSTemplets_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (grdLister.CurrentRow != null && grdLister.CurrentRow is GridViewDataRowInfo) { string totalSeats = grdLister.CurrentRow.Cells["TotalSeats"].Value.ToStr(); int totalNoOfSeats = 0; int availableSeats = 0; if (!string.IsNullOrEmpty(totalSeats)) { totalNoOfSeats = totalSeats.ToInt(); if (!string.IsNullOrEmpty(grdLister.CurrentRow.Cells["AvailSeats"].Value.ToStr().Trim())) { availableSeats = grdLister.CurrentRow.Cells["AvailSeats"].Value.ToInt(); } } if (availableSeats - this.TotalAllocatingPax < 0) { ENUtils.ShowMessage("Available seats are not enough to Allocate " + this.TotalAllocatingPax + " Passenger(s) in this Group"); return; } this.SelectedGroup = new BookingGroup(); this.SelectedGroup.Id = grdLister.CurrentRow.Cells["Id"].Value.ToLong(); this.SelectedGroup.GroupName = grdLister.CurrentRow.Cells["GroupName"].Value.ToStr(); this.SelectedGroup.FlightDepartureDate = grdLister.CurrentRow.Cells["FlightDeparture"].Value.ToDateTime(); } this.Close(); }
private void radGridView1_CellDoubleClick(object sender, GridViewCellEventArgs e) { try { if (MessageBox.Show("สร้างรายการสั่งซื้อ ?", "บันทึก", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { dgvData.EndEdit(); //dt_createPR List <GridViewRowInfo> dgvRow_List = new List <GridViewRowInfo>(); dgvRow_List.Add(dgvData.CurrentRow); if (dgvRow_List.Count() > 0) { CreatePR MS = new CreatePR(dgvRow_List); MS.ShowDialog(); } else { MessageBox.Show("กรุณาเลือกรายการ"); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void MasterTemplate_CellDoubleClick(object sender, GridViewCellEventArgs e) { try { if (e.RowIndex > -1) { if (screen.Equals(1)) { if (!Convert.ToString(e.Row.Cells["RCNo"].Value).Equals("")) { RCNo_tt.Text = Convert.ToString(e.Row.Cells["RCNo"].Value); this.Close(); } else { RCNo_tt.Text = Convert.ToString(e.Row.Cells["RCNo"].Value); PRNo_tt.Text = Convert.ToString(e.Row.Cells["PRNo"].Value); this.Close(); } } else { Receive a = new Receive(Convert.ToString(e.Row.Cells["RCNo"].Value), Convert.ToString(e.Row.Cells["PRNo"].Value)); a.ShowDialog(); // this.Close(); } } }catch (Exception ex) { MessageBox.Show(ex.Message); } }
void grdNearestDrv_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (e.Row != null && e.Row is GridViewDataRowInfo) { ddl_Driver.SelectedValue = e.Row.Cells["Id"].Value.ToInt(); } }
private void grdVisits_CellDoubleClick(object sender, GridViewCellEventArgs e) { Visit visit = e.Row.DataBoundItem as Visit; if (visit != null) { FormDefineVisit frm = new FormDefineVisit(visit.Id); frm.ShowDialog(); } }
private void documentsGrid_DoubleClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex != -1) { DocumentView dv = new DocumentView((Document)dbs.Current); dv.ShowDialog(); new DAOs.ClientsDAO(db).update(); FillGrid(); } }
private void gvSubjects_CellEditorInitialized(object sender, GridViewCellEventArgs e) { if (e.Row is GridViewNewRowInfo) { var editor = e.ActiveEditor as RadDropDownListEditor; if (editor != null) { editor.ValueChanged -= new EventHandler(editor_ValueChanged); editor.ValueChanged += new EventHandler(editor_ValueChanged); } } }
private void clientsTable_CellDoubleClick(object sender, GridViewCellEventArgs e) { //if double clicked on an a row we must open it on the client view for edit //we can find user's data with its ID if (e.RowIndex != -1) { ClientView c = new ClientView((Client)cb.Current); c.ShowDialog(); new DAOs.ClientsDAO(db).update(); FillGrid(); } }
private void projectsTable_CellDoubleClick(object sender, GridViewCellEventArgs e) { //if double clicked on an a row we must open it on the project view for edit //we can find project's data with its ID if (e.RowIndex != -1) { int id = Convert.ToInt32(projectsTable.CurrentRow.Cells["ID"].Value); projectpage p = new projectpage(id); p.ShowDialog(); FillGrid(); } }
private void radGridTu_CellDoubleClick(object sender, GridViewCellEventArgs e) { EditTU editTU = new EditTU(); editTU.id = id; editTU.nama = nama; editTU.password = password; editTU.ShowDialog(); }
private void grdVisits_CellDoubleClick(object sender, GridViewCellEventArgs e) { //todo (new FormDefineVisit(e.Row.DataBoundItem as Visit)).ShowDialog(); }
private void radGridPembayaran_CellDoubleClick(object sender, GridViewCellEventArgs e) { EditPembayaran pembayaran = new EditPembayaran(); pembayaran.id = idtab; pembayaran.nis = id; pembayaran.nama = nama; pembayaran.kelas = kelas; pembayaran.cathering = cathering; pembayaran.bulan = bulan; pembayaran.ShowDialog(); }
private void rgv_ApproveHR_CellClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (e.Column.Name == "ApproveButton") { GridViewRowInfo row = (GridViewRowInfo)rgv_ApproveHR.Rows[e.RowIndex]; string DocId = row.Cells["DOCID"].Value.ToString(); string Doctype = row.Cells["DOCTYP"].Value.ToString().Trim(); if (Doctype == "001") { using (Cancle_ApproveHR_DetailDL frm = new Cancle_ApproveHR_DetailDL(DocId, Doctype)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ GetdataCN(); } } } else if (Doctype == "002") { using (Cancle_ApproveHR_DetailCHG frm = new Cancle_ApproveHR_DetailCHG(DocId, Doctype)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ GetdataCN(); } } } if (Doctype == "003") { using (Cancle_ApproveHR_DetailDS frm = new Cancle_ApproveHR_DetailDS(DocId, Doctype)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ GetdataCN(); } } } } } }
private void rgv_ApproveHD_CellClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (e.Column.Name == "ApproveButton") { GridViewRowInfo row = (GridViewRowInfo)rgv_ApproveHD.Rows[e.RowIndex]; string DocId = row.Cells["DOCID"].Value.ToString(); string Doctype = row.Cells["DOCTYP"].Value.ToString().Trim(); if ((DateTime.Compare(DateTime.Now.Date, Convert.ToDateTime(rgv_ApproveHD.CurrentRow.Cells["EXPIREDATE"].Value.ToString()))) > 0) { MessageBox.Show("ไม่สามารถอนุมัติได้ เนื่องจากเกินวันที่ที่อนุมัติ", "HRDOCS", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } else { if (Doctype == "001") { using (Cancle_ApproveHD_DetailDL frm = new Cancle_ApproveHD_DetailDL(DocId, Doctype)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ GetdataCN(); } } } else if (Doctype == "002") { using (Cancle_ApproveHD_DetailCHD frm = new Cancle_ApproveHD_DetailCHD(DocId, Doctype)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ GetdataCN(); } } } if (Doctype == "003") { using (Cancle_ApproveHD_DetailDS frm = new Cancle_ApproveHD_DetailDS(DocId, Doctype)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ GetdataCN(); } } } } } } }
private void radGridSurat_CellDoubleClick(object sender, GridViewCellEventArgs e) { EditSurat editSurat = new EditSurat(); editSurat.id = id; editSurat.noSurat = noSurat; editSurat.lampiran = lampiran; editSurat.perihal = perihal; editSurat.jenis = jenis; editSurat.pengirim = pengirim; editSurat.ShowDialog(); }
private void radGridView1_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex != -1) { int customerId = Convert.ToInt32(radGridView1.Rows[e.RowIndex].Cells[0].Value.ToString()); //MessageBox.Show(radGridView1.Rows[e.RowIndex].Cells[0].Value.ToString()); new CustomerInfoForm(customerId).ShowDialog(); } }
private void dgvSesiones_CellClick(object sender, GridViewCellEventArgs e) { cboTender.SelectedIndex = cboTender.FindStringExact(dgvSesiones.SelectedRows[0].Cells["nombrefull"].Value.ToString()); txtNotasTender.Text = dgvSesiones.SelectedRows[0].Cells["notasTender"].Value.ToString(); txtProtocolo.Text = dgvSesiones.SelectedRows[0].Cells["protocolo"].Value.ToString(); txtConsumoO2.Text = dgvSesiones.SelectedRows[0].Cells["consumoOxigeno"].Value.ToString(); dtpFechaSesion.Value = Convert.ToDateTime(dgvSesiones.SelectedRows[0].Cells["fechaSesion"].Value.ToString()); }
void _gridViewFile_CellEdited(object sender, GridViewCellEventArgs e) { var editFile = e.Item as FileInfoView; var items = (sender as GridView).DataStore as DataStoreCollection<FileInfoView>; if (e.Column == 1) //edit name { if (editFile.IsCreateing) //create dir { var newText = editFile.Name; if (string.IsNullOrEmpty(newText) || newText == _oldName) { Undo(items, e.Row, _oldName, EditType.CreateDir); return; } if (_oldFiles.FirstOrDefault(r => r == newText) != null) { MessageBox.Show("This name already exists, please rename"); Undo(items, e.Row, _oldName, EditType.CreateDir); return; } //创建文件夹 var currentDir = GetCurrentDirPath(); string dirName = newText; string dirFullPath = currentDir + _status.PathSeparator + dirName; _fileManager.CreateDir(dirFullPath); } else //rename { var newText = editFile.Name; if (string.IsNullOrEmpty(newText) || newText == _oldName) { Undo(items, e.Row, _oldName,EditType.Rename); return; } if (_oldFiles.FirstOrDefault(r => r == newText) != null) { MessageBox.Show("This name already exists, please rename"); Undo(items, e.Row, _oldName, EditType.Rename); return; } //发送重命名请求 //oldFileName,newFileName //为了安全起见,这里使用绝对路径 var currentDir = GetCurrentDirPath(); string oldFileName = _oldName; string newFileName = newText; string oldFileNameFullPath = currentDir + _status.PathSeparator + oldFileName; string newFileNameFullPath = currentDir + _status.PathSeparator + newFileName; _fileManager.RenameFileOrDir(oldFileNameFullPath, newFileNameFullPath); } } else if (e.Column == 2)//edit mtime { var newText = editFile.FileMTime; if (string.IsNullOrEmpty(newText) || newText == _oldMTime) { Undo(items, e.Row, _oldMTime, EditType.EditMTime); return; } DateTime result; if (!DateTime.TryParse(newText, out result)) { MessageBox.Show("This time's format is error, please retry"); Undo(items, e.Row, _oldMTime, EditType.EditMTime); return; } //修改时间 _fileManager.ModifyFileOrDirTime(editFile.FullName, newText); } }
/// <summary> /// Gvs the parameter definition cell editor initialized. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="Telerik.WinControls.UI.GridViewCellEventArgs"/> instance containing the event data.</param> private void GvParameterDefinitionCellEditorInitialized(object sender, GridViewCellEventArgs e) { var editor = this.gvParameterDefinition.ActiveEditor as RadMaskedEditBoxEditor; if (editor != null) { //editor.MaskTextBox.MaskType = MaskType.Standard; var param = e.Row.DataBoundItem as Parameter; if (param != null) { editor.MaskTextBox.Mask = param.InputMask; } } }
private void gvSubjects_CellEditorInitialized(object sender, GridViewCellEventArgs e) { RadCheckBoxEditor cbEditor = e.ActiveEditor as RadCheckBoxEditor; if (cbEditor != null) { cbEditor.ValueChanged -= cbEditor_ValueChanged; cbEditor.ValueChanged += cbEditor_ValueChanged; } }
void _gridViewFile_CellEditing(object sender, GridViewCellEventArgs e) { _oldName = ((sender as GridView).SelectedItem as FileInfoView).Name; _oldFiles = ((sender as GridView).DataStore as DataStoreCollection<FileInfoView>).Select(r => r.Name).ToArray(); _oldMTime = ((sender as GridView).SelectedItem as FileInfoView).FileMTime; }
private void Rgv_ReportAllLeaveCount_CellClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex >= 0) { string GetYear = Cbb_Year.SelectedValue.ToString(); if (e.Column.Name == "DetaiButton") { GridViewRowInfo row = (GridViewRowInfo)Rgv_ReportAllLeaveCount.Rows[e.RowIndex]; string EmplId = row.Cells["PWEMPLOYEE"].Value.ToString(); string EmpName = row.Cells["PWNAME"].Value.ToString(); string LeveType = row.Cells["LEAVETYPE"].Value.ToString().Trim(); using (Leave_CheckLeave_Detail frm = new Leave_CheckLeave_Detail(EmplId, EmpName, LeveType, GetYear)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ GetEmpl(); } } } } }
private void lstIns_CellValueChanged(object sender, GridViewCellEventArgs e) { if (e.ColumnIndex != 0) return; Patient patient = patientBindingSource.DataSource as Patient; if (patient == null/*|| string.IsNullOrEmpty(patient.Code)*/) return; Insurance sc = lstIns.Rows[e.RowIndex].DataBoundItem as Insurance; if ((bool)e.Value) { if (patient.InsPtns.FirstOrDefault(item => item.InsuranceId == sc.Id) == null) { InsPtn rel = new InsPtn(); rel.Patient = patient; rel.InsuranceId = sc.Id; } } else { InsPtn i = patient.InsPtns.FirstOrDefault(item => item.Patient == patient && item.InsuranceId == sc.Id); if (i != null) patient.InsPtns.Remove(i); } }
private void GridViewShowData_CellClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (e.Column.Name == "OutOfficeId") { GridViewRowInfo row = (GridViewRowInfo)GridViewShowData.Rows[e.RowIndex]; string DocId = row.Cells["DocId"].Value.ToString(); string OutId = row.Cells["OutOfficeId"].Value.ToString(); FormDetailShowData Frm = new FormDetailShowData(DocId,OutId); Frm.Show(); } } }
private void RadGridView1CellValueChanged(object sender, GridViewCellEventArgs e) { try { this.db.SaveChanges(); } catch (System.Data.Entity.Infrastructure.DbUpdateException ex) { DialogResult ds = Telerik.WinControls.RadMessageBox.Show(this, text: "Значение не изменено !", caption: "Ошибка", buttons: MessageBoxButtons.OK, icon: Telerik.WinControls.RadMessageIcon.Info); } }
private void radGridTabungan_CellDoubleClick(object sender, GridViewCellEventArgs e) { EditTabungan tabungan = new EditTabungan(); tabungan.id = idtab; tabungan.nis = id; tabungan.nama = nama; tabungan.kelas = kelas; tabungan.jumlah = jumlah; tabungan.ShowDialog(); }
void _gridViewFile_CellDoubleClick(object sender, GridViewCellEventArgs e) { var selectFile = e.Item as FileInfoView; if (selectFile != null && selectFile.IsDir) { SetCurrentDirPath(selectFile.FullName); _fileManager.GetFileTree(GetCurrentDirPath()); } }
private void radGridSiswa_CellDoubleClick(object sender, GridViewCellEventArgs e) { EditSiswa editsiswa = new EditSiswa(); editsiswa.nis = id; editsiswa.nama = nama; editsiswa.kelas = kelas; editsiswa.ShowDialog(); }
private void gvAllSchedules_CellEditorInitialized(object sender, GridViewCellEventArgs e) { RadCheckBoxEditor cbEditor1 = e.ActiveEditor as RadCheckBoxEditor; if (cbEditor1 != null) { cbEditor1.ValueChanged -= cbEditor1_ValueChanged; cbEditor1.ValueChanged += cbEditor1_ValueChanged; } }
private void rgv_ApproveHR_CellClick(object sender, GridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (e.Column.Name == "ApproveButton") { GridViewRowInfo row = (GridViewRowInfo)rgv_ApproveHR.Rows[e.RowIndex]; string DocId = row.Cells["DOCID"].Value.ToString(); using (Chd_ApproveHR_Detail frm = new Chd_ApproveHR_Detail(DocId)) { //frm.Show(); if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { //โหลดข้อมูลใหม่ Getdata(); } } } } }
private void radGridPendaftaran_CellDoubleClick(object sender, GridViewCellEventArgs e) { EditDaftar daftar = new EditDaftar(); daftar.idtab = idtab; daftar.nis = id; daftar.nama = nama; daftar.kelas = kelas; daftar.jenis = jenis; daftar.jumlah = jumlah; daftar.ShowDialog(); }
private void GridCtaCte_CellClick(object sender, GridViewCellEventArgs e) { //MessageBox.Show("adsf"); }
private void gvGrades_CellValueChanged(object sender, GridViewCellEventArgs e) { int index = e.RowIndex; if (e.Column.Name == "FirstPeriodicRating") { classList[index].FirstPeriodicRating =(Double)(e.Row.Cells["FirstPeriodicRating"].Value); classList[index].FirstEntered = DateTime.Now; } else if (e.Column.Name == "SecondPeriodicRating") { classList[index].SecondPeriodicRating = (Double)(e.Row.Cells["SecondPeriodicRating"].Value); classList[index].SecondEntered = DateTime.Now; } else if (e.Column.Name == "ThirdPeriodicRating") { classList[index].ThirdPeriodicRating = (Double)(e.Row.Cells["ThirdPeriodicRating"].Value); classList[index].ThirdEntered = DateTime.Now; } else if (e.Column.Name == "FourthPeriodicRating") { classList[index].FourthPeriodicRating = (Double)(e.Row.Cells["FourthPeriodicRating"].Value); classList[index].FourthEntered = DateTime.Now; classList[index].FinalRating = (Double)(e.Row.Cells["FourthPeriodicRating"].Value); if (classList[index].FinalRating > 90) classList[index].Proficiency = "O"; else if (classList[index].FinalRating >= 85) classList[index].Proficiency = "VS"; else if (classList[index].FinalRating >= 80) classList[index].Proficiency = "S"; else if (classList[index].FinalRating >= 75) classList[index].Proficiency = "FS"; else if (classList[index].FinalRating <= 74) classList[index].Proficiency = "D"; } }