Ejemplo n.º 1
0
        private void BT_GetInfo_Click(object sender, EventArgs e)
        {
            if (LB_Order.SelectedIndex < 0)
            {
                return;
            }
            Order_ViewModel Select_Order = List_Order.Where(P => P.Order_ID == Convert.ToInt32(LB_Order.SelectedItem.ToString())).Single();

            if (GetCar_Client.SelectAllCarGets().Where(P => P.GetCar_Order == Select_Order.Order_ID).Count() == 0)
            {
                MessageBox.Show("您还没有进行提车操作!", "错误!");
                return;
            }
            Form_CatchCar form = new Form_CatchCar(Select_Order.Order_Count, Select_Order.Order_ID, 2);

            form.Owner = this;
            form.ShowDialog();
        }
Ejemplo n.º 2
0
        private void BT_CatchCar_Click(object sender, EventArgs e)
        {
            if (LB_Order.SelectedIndex < 0)
            {
                return;
            }
            Order_ViewModel Select_Order = List_Order.Where(P => P.Order_ID == Convert.ToInt32(LB_Order.SelectedItem.ToString())).Single();

            if (GetCar_Client.SelectAllCarGets().Where(P => P.GetCar_Order == Select_Order.Order_ID).Count() > 0)
            {
                MessageBox.Show("您的订单已经提车,请勿重复操作!", "错误!");
                return;
            }
            if (Select_Order.Order_End_Time < DateTime.Now)
            {
                MessageBox.Show("您的订单已经过期!", "错误!");
                return;
            }
            Form_CatchCar form = new Form_CatchCar(Select_Order.Order_Count, Select_Order.Order_ID, 1);

            form.Owner = this;
            form.ShowDialog();
        }