コード例 #1
0
        private void FillTXT()
        {
            txtnum.Text             = curentCar.CarNumber;
            cmbColor.SelectedValue  = curentCar.ColorCar;
            chfound.Checked         = curentCar.Finds;
            chbFix.Checked          = curentCar.Fix;
            dtpT.Value              = curentCar.DateTest;
            dtpB.Value              = curentCar.DateTest;
            txtKm.Text              = curentCar.DroveKM.ToString();
            cmbBranch.SelectedValue = curentCar.CoudBranch;
            ParkingInBranchTable curentp = new ParkingInBranchTable();
            int com = Convert.ToInt32(cmbBranch.SelectedValue);

            Suport.FillCombox(cmbPlace, curentp.FillConbo(com), "fullName", "coudParking");
            cmbPlace.SelectedValue  = curentCar.CoudeParking;
            cmbDesign.SelectedValue = curentCar.CoudDesign;

            txtAmount.Text = curentCar.AmountGasIn.ToString();
            try
            {
                pcbPicture.Image = Image.FromFile(Application.StartupPath + @"\carsForTheProject\" + curentCar.Picture);
            }
            catch { }
            cmbPlace.Enabled = true;
        }
コード例 #2
0
 private void cmbBranch_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         countForBranch++;
         ParkingInBranchTable curentp = new ParkingInBranchTable();
         int com = Convert.ToInt32(cmbBranch.SelectedValue);
         Suport.FillCombox(cmbPlace, curentp.FillConbo(com), "fullName", "coudParking");
         if (countForBranch != 0)
         {
             cmbPlace.Enabled = true;
         }
         countForBranch++;
     }
     catch { }
 }
コード例 #3
0
        private void  AddParking(int x, int y)
        {
            string               names;
            ParkingInBranch      curentp      = new ParkingInBranch();
            ParkingInBranchTable curentPTable = new ParkingInBranchTable();

            for (int i = 0; i < x; i++)
            {
                for (int j = 0; j <= y; j++)
                {
                    names = Convert.ToString(j);
                    curentp.CoudParking = curentPTable.GetNewKey();
                    curentp.CoudeBranch = curentBranch.BranchCoude;
                    curentp.Fullparking = false;
                    if (i == 0 && j == 0)
                    {
                        curentp.NumParking = "";
                    }
                    else
                    {
                        if (i == 0)
                        {
                            curentp.NumParking = "A/" + names;
                        }
                        if (i == 1)
                        {
                            curentp.NumParking = "B/" + names;
                        }
                        if (i == 2)
                        {
                            curentp.NumParking = "C/" + names;
                        }
                    }
                    curentPTable.AddToAccess(curentp);
                }
            }
        }