示例#1
0
        protected void btnAddTruck_Click(object sender, EventArgs e)
        {
            bool bPunClosed = (ginProcess.GINProcessInformation.RemainingWeight <= 0);

            if (bPunClosed)
            {
                GINProcessWrapper.ClosePun();
                GINProcessWrapper.RemoveGINProcessInformation();
                transferedData.Return();
            }
            else
            {
                DriverDataEditor.IsNew  = true;
                TruckDataEditor.IsNew   = true;
                TrailerDataEditor.IsNew = true;
                TruckRegistrationInfo truckRegistration = new TruckRegistrationInfo()
                {
                    GINTruck = ginProcess.GetBlankTruck()
                };
                DriverDataEditor.DataSource = truckRegistration.GINTruck;
                DriverDataEditor.DataBind();
                TruckDataEditor.DataSource = truckRegistration.Truck;
                TruckDataEditor.DataBind();
                TrailerDataEditor.DataSource = truckRegistration.Trailer;
                TrailerDataEditor.DataBind();
                mpeTruckDataEditorExtender.Show();
            }
        }