Пример #1
0
        private void writePersonalData()
        {
            PersonalData s = SelectedData.getPersonalData();

            wsTemplate.Cells[3, 3].Value2 = "   " + s.getCompanyName();                                     //company name
            wsTemplate.Cells[4, 3].Value2 = "   " + s.getCity() + " " + s.getStreet();                      //city
            wsTemplate.Cells[5, 3].Value2 = "   " + s.getPsc();                                             //psc
            wsTemplate.Cells[6, 3].Value2 = "   " + s.getState();                                           //state
            wsTemplate.Cells[3, 5].Value2 = "  Meno: " + s.getName() + " " + s.getLastName();               //seler name
            wsTemplate.Cells[4, 5].Value2 = "      IČO: " + s.getIco();                                     //ico
            wsTemplate.Cells[5, 5].Value2 = "      DIČ: " + s.getDic();                                     //dic
            wsTemplate.Cells[6, 5].Value2 = "IČ DPH: " + s.getIcDPH();                                      //ic dph
            wsTemplate.Cells[4, 8].Value2 = s.getPhoneNumber();                                             //phone number
            wsTemplate.Cells[5, 8].Value2 = s.getEmail();                                                   //email adress
            wsTemplate.Cells[6, 8].Value2 = s.getEmail2();;                                                 //second email adress
            wsTemplate.Cells[8, 2].Value2 = "Dodací list č: " + s.getLastID() + "/" + s.getYearOFLastID();  //Dodaci list č:

            wsTemplate.Cells[54, 3].Value2 = "   " + s.getCompanyName();                                    //company name
            wsTemplate.Cells[55, 3].Value2 = "   " + s.getCity() + " " + s.getStreet();                     //city
            wsTemplate.Cells[56, 3].Value2 = "   " + s.getPsc();                                            //psc
            wsTemplate.Cells[57, 3].Value2 = "   " + s.getState();                                          //state
            wsTemplate.Cells[54, 5].Value2 = "  Meno: " + s.getName() + " " + s.getLastName();              //seler name
            wsTemplate.Cells[55, 5].Value2 = "      IČO: " + s.getIco();                                    //ico
            wsTemplate.Cells[56, 5].Value2 = "      DIČ: " + s.getDic();                                    //dic
            wsTemplate.Cells[57, 5].Value2 = "IČ DPH: " + s.getIcDPH();                                     //ic dph
            wsTemplate.Cells[55, 8].Value2 = s.getPhoneNumber();                                            //phone number
            wsTemplate.Cells[56, 8].Value2 = s.getEmail();                                                  //email adress
            wsTemplate.Cells[57, 8].Value2 = s.getEmail2();;                                                //second email adress
        }
Пример #2
0
        private void selerComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            PersonalData pd = ex.getPersonalDataList()[selerComboBox.SelectedIndex];

            SelerIdtextBox.Text = (Convert.ToInt32(pd.getLastID()) + 1).ToString();
            yeartextBox.Text    = pd.getYearOFLastID().Substring(pd.getYearOFLastID().Length - 2);
            canPrint();
        }
Пример #3
0
        //actions necessary before printing fill selectedData Class and creatw print object
        private void printInitialisation()
        {
            Clients      c = null;
            string       l = null;
            PersonalData s = null;

            //find client
            for (int i = 0; i < ex.getClientsList().Count; i++)
            {
                if (ex.getClientsList()[i].getNick() == clientsComboBox.Text)
                {
                    c = ex.getClientsList()[i];
                    break;
                }
            }
            //find license plate
            for (int i = 0; i < ex.getCarList().Count; i++)
            {
                if (ex.getCarList()[i].getName() == carsComboBox.Text)
                {
                    l = ex.getCarList()[i].getLicensePlate();
                    break;
                }
            }
            //find seler
            for (int i = 0; i < ex.getPersonalDataList().Count; i++)
            {
                if (ex.getPersonalDataList()[i].getName() == selerComboBox.Text)
                {
                    s = ex.getPersonalDataList()[i];
                    break;
                }
            }

            s.setLastID(SelerIdtextBox.Text);
            SelerIdtextBox.Text = (Convert.ToInt32(SelerIdtextBox.Text) + 1).ToString();
            selectedData.setPersonalData(s);
            selectedData.setClient(c);
            selectedData.setLicensePlate(l);
            print.setSelectedData(selectedData);
        }
Пример #4
0
 public void AddOrEditData(PersonalData c)
 {
     if (c.getID() == 0)
     {
         PersonalData last = PersonalDataList[PersonalDataList.Count - 1];
         c.setID(PersonalDataList[PersonalDataList.Count - 1].getID());
         PersonalDataList[PersonalDataList.Count - 1] = c;
         last.setID(PersonalDataList[PersonalDataList.Count - 1].getID() + 1);
         PersonalDataList.Add(last);
         return;
     }
     else
     {
         for (int i = 0; i < PersonalDataList.Count; i++)
         {
             if (PersonalDataList[i].getID() == c.getID())
             {
                 PersonalDataList[i] = c;
                 return;
             }
         }
     }
 }
Пример #5
0
 public void setPersonalData(PersonalData value)
 {
     personalData = value;
 }