예제 #1
0
        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;
        }
예제 #2
0
        public void SaveData()
        {
            gridView1.PostEditor();
            gridView1.UpdateCurrentRow();

            Context.SaveChanges();
        }
예제 #3
0
        public void SaveData()
        {
            System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;

            gridView1.PostEditor();
            gridView1.UpdateCurrentRow();

            _context.SaveChanges();

            System.Windows.Forms.Cursor.Current = Cursors.Default;
        }
예제 #4
0
        public void SaveData()
        {
            Cursor.Current = Cursors.WaitCursor;

            gridView1.PostEditor();
            gridView1.UpdateCurrentRow();

            _context.SaveChanges();

            Cursor.Current = Cursors.Default;
        }
예제 #5
0
 public string SaveContext()
 {
     try
     {
         _context.SaveChanges();
         return("");
     }
     catch (Exception ex)
     {
         return("Failed to save quote.");
     }
 }
예제 #6
0
 public void SaveLtaData(out string errorMessage)
 {
     errorMessage = "";
     try
     {
         if (_ltaContext != null)
         {
             _ltaContext.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         errorMessage = "Failed to retrieve LTA grid data.";
     }
 }
예제 #7
0
 public void SaveData()
 {
     Context.SaveChanges();
 }