private void buttonEdit_Click(object sender, EventArgs e)
        {
            orderdetail = new OrderRecordView("edit", username, Convert.ToInt32(dataGridViewData.SelectedRows[0].Cells[0].Value));
            if (_temp.total_data(username) > 0)
            {
                _temp.delete_temp(username);
            }
            _detail.clone_to_temp(Convert.ToInt32(dataGridViewData.SelectedRows[0].Cells[0].Value), username);

            orderdetail.date         = DateTime.Parse(dataGridViewData.SelectedRows[0].Cells[1].Value.ToString());
            orderdetail.status_order = dataGridViewData.SelectedRows[0].Cells[3].Value.ToString();
            orderdetail.ShowDialog();
            content_Change();
        }
 private void buttonNew_Click(object sender, EventArgs e)
 {
     if (_temp.total_data(username) > 0)
     {
         var confirmResult = MessageBox.Show("There are Datas unsaved, Retrieve Data?",
                                             "Data Confirmation",
                                             MessageBoxButtons.YesNo);
         if (confirmResult == DialogResult.No)
         {
             _temp.delete_temp(username);
         }
     }
     orderdetail = new OrderRecordView("new", username, 0);
     orderdetail.ShowDialog();
     content_Change();
 }
 private void Orderdetail_FormClosed(object sender, FormClosedEventArgs e)
 {
     orderdetail = null;
 }