public void SaveData() { ObjectParameter result = new ObjectParameter("Result", typeof(Int32)); ObjectParameter tranDt = new ObjectParameter("TranDT", typeof(DateTime)); System.Windows.Forms.Cursor.Current = Cursors.WaitCursor; gridView1.PostEditor(); gridView1.UpdateCurrentRow(); Context.SaveChanges(); // If deletes were made, update all quotes that are using the deleted value with the new value if (ReplacementList.Count > 0) { foreach (var item in ReplacementList) { string[] vals = item.Split(','); try { // deleting value, replacing value Context.usp_QT_ReplaceQuoteLogValues(vals[0], vals[1], vals[2], tranDt, result); } catch (Exception ex) { if (ex.InnerException != null) { MessageBox.Show(ex.InnerException.ToString().Remove(ex.InnerException.ToString().IndexOf("at System.")), "Error"); } } } } System.Windows.Forms.Cursor.Current = Cursors.Default; }
public void SaveData() { gridView1.PostEditor(); gridView1.UpdateCurrentRow(); Context.SaveChanges(); }
public void SaveData() { System.Windows.Forms.Cursor.Current = Cursors.WaitCursor; gridView1.PostEditor(); gridView1.UpdateCurrentRow(); _context.SaveChanges(); System.Windows.Forms.Cursor.Current = Cursors.Default; }
public void SaveData() { Cursor.Current = Cursors.WaitCursor; gridView1.PostEditor(); gridView1.UpdateCurrentRow(); _context.SaveChanges(); Cursor.Current = Cursors.Default; }
public string SaveContext() { try { _context.SaveChanges(); return(""); } catch (Exception ex) { return("Failed to save quote."); } }
public void SaveLtaData(out string errorMessage) { errorMessage = ""; try { if (_ltaContext != null) { _ltaContext.SaveChanges(); } } catch (Exception ex) { errorMessage = "Failed to retrieve LTA grid data."; } }
public void SaveData() { Context.SaveChanges(); }