public void intoShow(goods one) { m_status = Status.showStatus; this.Top = m_form.getSubTop(); ok_button.Visible = false; cal_button.Visible = false; number_textBox.ReadOnly = true; number_textBox.Text = one.number; source_textBox.ReadOnly = true; source_textBox.Text = one.source; dest_comBox.Items.Clear(); dest_comBox.Items.Add(one.dest); dest_comBox.SelectedIndex = 0; arrive_time.Enabled = false; arrive_time.Value = Convert.ToDateTime(one.arriveTime); dead_time.Enabled = false; dead_time.Value = Convert.ToDateTime(one.deadline); status_comBox.Enabled = false; status_comBox.Items.Clear(); status_comBox.Items.Add(one.status); status_comBox.SelectedIndex = 0; vech_comBox.Enabled = false; vech_comBox.Items.Clear(); vech_comBox.Items.Add(one.objVechicle); vech_comBox.SelectedIndex = 0; finish_time.Enabled = false; finish_time.Value = Convert.ToDateTime(one.finishTime); this.Visible = true; }
private void ok_button_Click(object sender, EventArgs e) { goods one = new goods(); one.number = number_textBox.Text; one.source = source_textBox.Text; one.dest = dest_comBox.Text; one.arriveTime = arrive_time.Value.ToString("yyyy-MM-dd"); one.deadline = dead_time.Value.ToString("yyyy-MM-dd"); one.objVechicle = deferVech(vech_comBox.Text); one.status = status_comBox.Text; one.finishTime = finish_time.Value.ToString("yyyy-MM-dd"); if (m_status == Status.addStatus) { m_form.insertGoods(one); } else { m_form.updateGoods(one); } m_form.setStatus(formStatus.noneStaus); //m_form.goFull(); //this.Visible = false; }
public void updateGoods(goods one) { m_sql.updateGoods(one); load(); }
public void deleteGoods(goods one) { m_sql.deleteGoods(one); load(); }
public void insertGoods(goods one) { m_sql.insertGoods(one); load(); }