Esempio n. 1
0
 private void btn_addNew_Click(object sender, EventArgs e)
 {
     if (AAonRating.aaon.OrderRowNo > 0)
     {
         foreach(DataGridViewRow row in AAonRating.aaon.dataGridView1.Rows)
         {
             if (row.Selected == true)
                 AAonRating.aaon.RowIndex = (int)row.Cells[9].Value;
         }
         AAonRating.aaon.RowIndexDGV2++;
         AddNewUnit ANU = new AddNewUnit();
         ANU.OrderSale = AAonRating.aaon.RowIndex;
         ANU.Show();
     }
     else
         if (MessageBox.Show("必须要先添加一个订单,你希望添加订单吗?", "Add Unit Error", MessageBoxButtons.OKCancel) == DialogResult.OK)
         {
             orderImformation odInfo = new orderImformation();
             //AAonRating.aaon.OrderRowNo++;
             odInfo.Show();
         }
 }
Esempio n. 2
0
 //点击增加订单按钮;
 private void btn_add_Click(object sender, EventArgs e)
 {
     orderImformation odInfo = new orderImformation();
     //AAonRating.aaon.OrderRowNo++;
     odInfo.Show();
 }
Esempio n. 3
0
        //修改订单信息;
        private void btn_edit_Click(object sender, EventArgs e)
        {
            if (AAonRating.aaon.OrderRowNo > 0)
            {
                AAonRating.aaon.AddOrder = false;
                orderImformation NewOrdInfo = new orderImformation();
                foreach (DataGridViewRow row in AAonRating.aaon.dataGridView1.Rows)
                {
                    if (row.Selected == true)
                        AAonRating.aaon.RowIndex = (int)row.Cells[9].Value;
                }

                //得到选定行的订单信息并显示在对话框上;
                NewOrdInfo.TmpOrder = OrderBLL.getOrders(AAonRating.aaon.RowIndex);
                if (NewOrdInfo.TmpOrder.Count > 0)
                {
                    NewOrdInfo.Jobno_textBox.Text = NewOrdInfo.TmpOrder.First().JobNum;
                    NewOrdInfo.JobName_textBox.Text = NewOrdInfo.TmpOrder.First().JobName;
                    NewOrdInfo.jobDes_textBox.Text = NewOrdInfo.TmpOrder.First().JobDes;
                    NewOrdInfo.Name_comboBox.Text = NewOrdInfo.TmpOrder.First().Customer;
                    NewOrdInfo.site_numericUpDown.Value = NewOrdInfo.TmpOrder.First().Site;
                    NewOrdInfo.AAONContact_comboBox.Text = NewOrdInfo.TmpOrder.First().AAonCon;
                }
                NewOrdInfo.ShowInfoData(AAonRating.aaon.RowIndex);
                NewOrdInfo.Show();
            }
        }