private void gdvSubTypes_RowUpdated(object sender, RowObjectEventArgs e) { try { GridView view = (GridView)sender; if (view.FocusedRowHandle != DevExpress.XtraGrid.GridControl.AutoFilterRowHandle) { int rowHandle; if (view.FocusedRowHandle == DevExpress.XtraGrid.GridControl.NewItemRowHandle) { rowHandle = view.DataRowCount - 1; } else { rowHandle = view.FocusedRowHandle; } MaterialSubTypeObject subType = (MaterialSubTypeObject)view.GetRow(rowHandle); if (subType != null) { new BL.Internal.MaterialSubType().Save(subType); } } } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } }
private void GridView1_RowUpdated(object sender, RowObjectEventArgs e) { int[] selectedRows = gridView1.GetSelectedRows(); var dateVal = ""; var taskVal = ""; var time = ""; var id = 0; foreach (int rowHandle in selectedRows) { if (rowHandle >= 0) { dateVal = gridView1.GetRowCellValue(rowHandle, "Date").ToString(); taskVal = gridView1.GetRowCellValue(rowHandle, "Tasks").ToString(); time = gridView1.GetRowCellValue(rowHandle, "No_of_Hours").ToString(); id = Convert.ToInt32(gridView1.GetRowCellValue(rowHandle, "Id")); using (var cont = new DemoDBEntities()) { var res = cont.TimeSheets.Where(x => x.Id == id).First(); res.Date = dateVal; res.Tasks = taskVal; res.No_of_Hours = Convert.ToInt32(time); cont.SaveChanges(); } } } MessageBox.Show("Updated!!!"); }
private void RowUpdated(object sender, RowObjectEventArgs rowObjectEventArgs) { if (rowObjectEventArgs.Row != null) { OnElementUpdated(sender, rowObjectEventArgs.Row); } }
public void gvOreBody_RowUpdated(object sender, RowObjectEventArgs e) { // gvOreBody.CloseEditForm(); // gvOreBody_ValidateRow(sender, e as ValidateRowEventArgs); //DataTable gridedit = new DataTable(); //// DataTable dt = new DataTable(); //var ID = gvOreBody.GetRowCellValue(gvOreBody.FocusedRowHandle, gvOreBody.Columns["Id"]).ToString(); //foreach (GridColumn column in myEdit . gvOreBodyEdit.VisibleColumns) //{ // gridedit.Columns.Add(column.FieldName, column.ColumnType); //} //for (int i = 0; i < myEdit.gvOreBodyEdit.DataRowCount; i++) //{ // DataRow row = gridedit.NewRow(); // foreach (GridColumn column in myEdit.gvOreBodyEdit.VisibleColumns) // { // row[column.FieldName] = myEdit.gvOreBodyEdit.GetRowCellValue(i, column); // } // gridedit.Rows.Add(row); //} //if (myEdit . txtName.Text == "") //{ // _sysMessagesClass.viewMessage(MessageType.Info, "Info", "Please enter the Common Area", ButtonTypes.OK, MessageDisplayType.Small); // return; //} //_clsOreBody.SaveOreBody(myEdit.txtName.Text, Convert.ToString(ID), TheAction, gridedit); //Mineware.Systems.Global.sysNotification.TsysNotification.showNotification("Data Saved", "Ore Body data Saved", Color.CornflowerBlue); }
private void gvDen_RowUpdated(object sender, RowObjectEventArgs e) { if (this.gvDen.IsNewItemRow(e.RowHandle)) { this.hocSinhRowBindingSourceDi.RemoveCurrent(); } }
private void detailView_RowUpdated(object sender, RowObjectEventArgs e) { var detailView = sender as GridView; PurchaseViewModel row = detailView.GetFocusedRow() as PurchaseViewModel; _purchaseService.UpdatePurchase(row); //RefreshData(true); }
void frmSingletonEntity_RowUpdated(object sender, RowObjectEventArgs e) { if (e.RowHandle < 0) { return; } ((BaseEntity)e.Row).ClearError(); }
//修改Header private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { SplashScreenManager.ShowDefaultWaitForm(); RequestHeaderViewModel row = (RequestHeaderViewModel)this.gridView1.GetFocusedRow(); _requestService.UpdateRequestHeader(row); SplashScreenManager.CloseDefaultWaitForm(); }
void gv_RowUpdated(object sender, RowObjectEventArgs e) { if (e.RowHandle < 0) { return; } eColl.ClearError(e.RowHandle); }
private void gridViewStudent_RowUpdated(object sender, RowObjectEventArgs e) { var index = gridViewStudent.GetDataSourceRowIndex(e.RowHandle); var student = studentList[index]; StudentBusiness.EditStudent(student); gridControl1.RefreshDataSource(); }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { GridView gridView1 = sender as GridView; SupplierViewModel row = this.gridView1.GetFocusedRow() as SupplierViewModel; _managementService.UpdateSupplier(row); RefreshData(true); }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { if (sender is GridView gridView) { ItemViewModel row = gridView.GetFocusedRow() as ItemViewModel; _managementService.UpdateItem(row); } }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { try { this.ordersTableAdapter.Update(this.nwindDataSet.Orders); } catch { XtraMessageBox.Show("Update failed"); } }
private void detailView1_RowUpdated(object sender, RowObjectEventArgs e) { SplashScreenManager.ShowDefaultWaitForm(); var detailView = sender as GridView; ContractViewModel row = (ContractViewModel)detailView.GetFocusedRow(); _managemntService.UpdateContract(row); SplashScreenManager.CloseDefaultWaitForm(); }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { SplashScreenManager.ShowDefaultWaitForm(); PoNumberViewModel row = (PoNumberViewModel)this.gridView1.GetFocusedRow(); _managemntService.UpdatePo(row); SplashScreenManager.CloseDefaultWaitForm(); RefreshData(); }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { ColumnView view = gridControl1.FocusedView as ColumnView; if (view.UpdateCurrentRow()) { e00DMNHVTTableAdapter.Update(eWONDATASET.E00DMNHVT); } }
private void gridView2_RowUpdated(object sender, RowObjectEventArgs e) { ColumnView view = gridControl2.FocusedView as ColumnView; if (view.UpdateCurrentRow()) { E10CTVBTTableAdapter2.Update(ewondataset2.E10CTVBT); txtTienhang.Text = gridView2.Columns["Tien_Nt"].SummaryItem.SummaryValue.ToString(); } }
private void AgrupacionDeArtista_gridView_RowUpdated(object sender, RowObjectEventArgs e) { AgrupacionDeArtista agrupacionDeArtista = (AgrupacionDeArtista)e.Row; //if (string.IsNullOrEmpty(Artista_textEdit.Text)){ // GridViewInfo viewInfo = AgrupacionDeArtista_gridView.GetViewInfo() as GridViewInfo; // AgrupacionDeArtista_gridView.DeleteRow(viewInfo.RowsInfo[viewInfo.RowsInfo.Count - 1].RowHandle); //} agrupacionDeArtista.ArtistaId = artistaId; AGlobalDataContext.SubmitChanges(); }
private void UserRole_GridView_RowUpdated(object sender, RowObjectEventArgs e) { UserCompany row = e.Row.CastTo <UserCompany>(); if (row.Status == ModifyMode.Insert) { return; } row.Status = ModifyMode.Update; }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { if (gridView1.IsNewItemRow(e.RowHandle)) { DataRow row = (e.Row as DataRowView).Row; row.SetValue(colId, LemHeader.SqlInsert(row.GetValue <DateTime>(colLogDate), row.GetValue <int>(colProjectCode), row.GetValueString(colLemNum), row.GetValueString(colDescription))); btnEmail.Enabled = true; btnPrint.Enabled = true; btnSubmit.Enabled = GetEnumName(EnumSubmitStatus.Open) == row.GetValueString(colSubmitStatus); } }
private void OrganizationGridViewRowUpdated(object sender, RowObjectEventArgs e) { var org = e.Row as organization; if (org != null) { org.id_organization_parent = _curIdOrganization; _objectContext.SaveChanges(); organizationTree.RefreshOrganizationTree(); } else _objectContext.Refresh(RefreshMode.StoreWins, _objectContext.organization); }
private void GridView_RowUpdated(object sender, RowObjectEventArgs e) { if (e.RowHandle == GridControl.NewItemRowHandle) { this.Context.AddToOrders((Order)e.Row); } else { this.Context.UpdateObject(e.Row); } }
private void AccountDetail_GridView_RowUpdated(object sender, RowObjectEventArgs e) { AccountDetail row = e.Row.CastTo <AccountDetail>(); if (row.Status == ModifyMode.Insert) { return; } row.Status = ModifyMode.Update; }
private void GridView1_RowUpdated(object sender, RowObjectEventArgs e) { if (!(gridView1.DataSource is Collection <DAL.InvoiceDetail> items)) { spn_Total.EditValue = 0; } else { spn_Total.EditValue = items.Sum(x => x.TotalPrice); } }
private void GridRowUpdated(object sender, RowObjectEventArgs e) { var items = Grid.DataSource as Collection <invoices_details>; if (items == null) { Sp_Total.EditValue = 0; } else { Sp_Total.EditValue = items.Sum(x => x.total_price); } }
//修改库位 private void positionView_RowUpdated(object sender, RowObjectEventArgs e) { var positionView = sender as GridView; PositionViewModel row = positionView.GetFocusedRow() as PositionViewModel; IList <PositionViewModel> positionViewModels = null; bool result = _managementService.TransferStorage(row, out positionViewModels); if (!result) { MessageBox.Show("请输出正确的库存数量"); } RefreshData(true); }
//修改detail protected void detailView_RowUpdated(object sender, RowObjectEventArgs e) { var detailView = sender as GridView; RequestViewModel row = (RequestViewModel)detailView.GetFocusedRow(); int result = _requestService.UpdateRequest(row); if (result == 2) { //SplashScreenManager.ShowDefaultWaitForm(); RefreshData(true); //SplashScreenManager.CloseDefaultWaitForm(); } }
private void grvAlert_RowUpdated(object sender, RowObjectEventArgs e) { //ConfigurationStatusModel objConfigurationStatus = new ConfigurationStatusModel(); DataRow row = ((DataRowView)e.Row).Row; if (row != null) { if (row.RowState == DataRowState.Modified) { objConfigurationStatus.Id = byte.Parse(row["Id"].ToString()); objConfigurationStatus.Name = (row["Name"].ToString()); objConfigurationStatus.Value = row["Value"].ToString(); objConfigurationStatus.Type = (byte)1; objConfigurationStatus.Notify = (bool)row["Notify"]; objConfigurationStatus.DateCreated = Convert.ToDateTime(row["DateCreated"].ToString()); objConfigurationStatus.Description = row["Description"].ToString(); objConfigurationStatus.Update(); grvAlert.RefreshData(); } else if (row.RowState == DataRowState.Added) { try { objConfigurationStatus.Name = (row["Name"].ToString()); objConfigurationStatus.Value = row["Value"].ToString(); objConfigurationStatus.Type = (byte)1; objConfigurationStatus.Notify = row["Notify"] == null || row["Notify"].Equals(DBNull.Value) ? false : (bool)row["Notify"]; //objConfigurationStatus.Notify = (bool)row["Notify"]; objConfigurationStatus.DateCreated = row["DateCreated"] == null || row["DateCreated"].Equals(DBNull.Value) ? DateTime.Now : Convert.ToDateTime(row["DateCreated"].ToString()); objConfigurationStatus.Description = row["Description"].ToString(); objConfigurationStatus.Save(); // Sơn PC => fix lỗi, thêm mới xong phải lấy lại Id thì mới xóa được chứ row["Id"] = objConfigurationStatus.Id; } catch (Exception) { try { ((DataRowView)e.Row).Row.Table.Rows.Remove(row); } catch { } } grvAlert.RefreshData(); } } else { grvAlert.RefreshData(); } }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { double sum = 0; if (gridView1.RowCount != 0) { for (int i = 0; i < gridView1.RowCount; i++) { sum = sum + double.Parse(gridView1.GetRowCellValue(i, "Price").ToString()); } txtBase.Text = sum.ToString(); txtTotal.Text = (sum - double.Parse(txtDiscount.Text) + double.Parse(txtTax.Text)).ToString(); } }
private void Cargos_gridView_RowUpdated(object sender, RowObjectEventArgs e) { try { _dataContext.SubmitChanges(); } catch (Exception) { var gridView = this.gridView; XtraMessageBox.Show("Error en la operacion", "Atención", MessageBoxButtons.OK, MessageBoxIcon.Hand); gridView.DeleteRow(e.RowHandle); } }
public void RowUpdated(object sender, RowObjectEventArgs e) { try { T Entity = (T)e.Row; Service <T> .AddOrUpdate(Entity); items.RefreshData(); items.BestFitColumns(); } catch (Exception ex) { Logger.Add(ex); } }
private void gridViewNgayPhatDauTien_RowUpdated(object sender, RowObjectEventArgs e) { gridViewNgayPhatDauTien.UpdateSummary(); }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { this.da.Update((DataTable)Binding1.DataSource); Binding1.DataSource = tabla; grdAsignaMateria.DataSource = Binding1; tabla.Clear(); DataBaseUtilities.OpenConnection(PathDataBase); da = DataBaseUtilities.FillDataAdapter("Select * From MaestroMateria Where Maestro='" + sName + "'"); OleDbCommandBuilder cmd = new OleDbCommandBuilder(da); this.da.Fill(tabla); Binding1.DataSource = tabla; grdAsignaMateria.DataSource = Binding1; DataBaseUtilities.CloseConnection(); gridView1.SelectRow(gridView1.SelectedRowsCount - 1); gridView1.BestFitColumns(); }
private void viewBookingPosition_RowUpdated(object sender, RowObjectEventArgs e) { if (ActiveBookingPosition != null && ActiveBookingPosition.BookingPositionId == 0) { ActiveBookingPosition.Booking = Booking; ImpressioDbContext.Instance.BookingsPositions.Add(ActiveBookingPosition); } ImpressioDbContext.Instance.SaveChanges(); }
private void viewAppointment_RowUpdated(object sender, RowObjectEventArgs e) { ImpressioDbContext.Instance.SaveChanges(); }
private void gridViewQuestion_RowUpdated(object sender, RowObjectEventArgs e) { if (e != null && e.Row != null) { var view = e.Row as DataRowView; if (view.DataView != null && view.DataView.Count > 0) { simpleButtonSaveQuestion.Enabled = true; } else { groupControlAnswerForm.Enabled = false; simpleButtonSaveQuestion.Enabled = true; } } }
private void gdvType_RowUpdated(object sender, RowObjectEventArgs e) { try { GridView view = (GridView)sender; if (view.FocusedRowHandle != DevExpress.XtraGrid.GridControl.AutoFilterRowHandle) { int rowHandle; if (view.FocusedRowHandle == DevExpress.XtraGrid.GridControl.NewItemRowHandle) rowHandle = view.DataRowCount - 1; else rowHandle = view.FocusedRowHandle; MaterialTypeObject type = (MaterialTypeObject)view.GetRow(rowHandle); if (type != null) { new BL.Internal.MaterialType().Save(type); } } } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } }
private void gridView_RowUpdated(object sender, RowObjectEventArgs e) { UpdateDisplay(); }
void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { try { ClientHelper.PlatformSqlMap.Update<PJ_tdjh>(e.Row); } catch { } }
private void IndicatorsGridViewRowUpdated(object sender, RowObjectEventArgs e) { _objectContext.SaveChanges(); }
private void gridView1_RowUpdated(object sender, RowObjectEventArgs e) { this.da.Update((DataTable)Binding1.DataSource); gridView1.BestFitColumns(); }
private void smGridView5_RowUpdated(object sender, RowObjectEventArgs e) { try { txt房价区片价.Text = ((DevExpress.XtraGrid.Views.Grid.GridView)(smGridView5)).GetDataRow(0)["区片价"].ToString(); } catch { } }