Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        SoldierDataManager.sdm = this;



        soldier  = new TempSoldier("name", "17-721043388", "50사단 123연대 5대대", "951027", "010-2890-6812");
        vacaList = new List <TempVacation>();
        DateTime baseDate, departDate, arriveDate;

/*
 *      for (int i = 0; i < 5; i++)//remain  Specialvacation
 *      {
 *          int vacakind = 1;// 0 : generalVacation  1: specialVacation
 *          baseDate = new DateTime(2020, 1, 1);
 *          arriveDate = baseDate.AddDays(UnityEngine.Random.Range(3, 7));
 *          int usedCheck = 0;// 0 : generalVacation  1: waiting for accept 2 : accept , Used vacation
 *          string vacationName = "vacationName"+i.ToString();
 *
 *          vacaList.Add(new TempVacation("soldiername" + i.ToString(), vacakind, baseDate, arriveDate, usedCheck, vacationName));
 *      }
 */
        /* for (int i=0; i<10;i++)//Used vacation
         * {
         *   int vacakind = UnityEngine.Random.Range(0, 2);// 0 : generalVacation  1: specialVacation
         *   baseDate = new DateTime(2020, 1, 1);
         *   departDate = baseDate.AddDays(UnityEngine.Random.Range(0, 350));
         *   arriveDate = departDate.AddDays(UnityEngine.Random.Range(3, 7));
         *   int usedCheck = 2;// 0 : generalVacation  1: waiting for accept 2 : accept , Used vacation
         *   string vacationName = "vacationName"+(i+5).ToString();
         *
         *   vacaList.Add(new TempVacation("soldiername"+i.ToString(), vacakind, departDate, arriveDate, usedCheck, vacationName));
         * }*/
    }
    // Start is called before the first frame update
    void Start()
    {
        remainSpVaca = new List <TempVacation>();

        do
        {
            sdm = SoldierDataManager.sdm;
        } while (sdm == null);

        setSpecialVacationDropDown();
    }
Esempio n. 3
0
    // Start is called before the first frame update
    void Start()
    {
        SoldierScreen3Tables = new List <GameObject>();

        do
        {
            sdm = SoldierDataManager.sdm;
        } while (sdm == null);

        Refresh();
    }
Esempio n. 4
0
    // Start is called before the first frame update
    void Start()
    {
        num       = 0;
        tableList = new List <GameObject>();
        tableList.Add(transform.GetChild(1).gameObject);

        do
        {
            sdm = SoldierDataManager.sdm;
        } while (sdm == null);

        //refresh();
    }
    void Start()
    {
        do
        {
            sdm = SoldierDataManager.sdm;
        } while (sdm == null);


        RestClient.Get <user>("https://fir-unity-6f472.firebaseio.com/soldiers/" + soldnumber + ".json").Then(response =>
        {
            user up = response;

            up          = response;
            sdm.soldier = new TempSoldier(up.nam, up.soldnu, up.affiliatio, up.birt, up.phon);

            Refresh();
        });
    }
Esempio n. 6
0
    void Start()
    {
        SoldierScreen4Tables = new List <GameObject>();

        do
        {
            sdm = SoldierDataManager.sdm;
        } while (sdm == null);

        RestClient.Get <accRejVacations>("https://fir-unity-6f472.firebaseio.com/accRejVacations/.json").Then(response =>
        {
            accRejVacations ar2 = new accRejVacations();
            ar2 = response;

            string[] acomp = ar2.accepted.Split('&');


            for (int i = 1; i < acomp.Length; i++)
            {
                string[] acompsplit = acomp[i].Split(';');
                DateTime baseDate   = new DateTime(2020, 1, 1);
                string formatString = "yyyy##MM##dd";



                DateTime deprt = new DateTime();
                DateTime arv   = new DateTime();


                deprt = DateTime.ParseExact(acompsplit[1], formatString, null);
                arv   = DateTime.ParseExact(acompsplit[2], formatString, null);

                Debug.Log("++" + acompsplit[0]);


                sdm.vacaList.Add(new TempVacation(acompsplit[0], UnityEngine.Random.Range(0, 2), deprt, arv, 2, "General"));
            }
            Refresh();
        });
    }
Esempio n. 7
0
    private void login()
    {
        SoldierDataManager sdm = null;

        RestClient.Get <user>("https://fir-unity-6f472.firebaseio.com/soldiers/" + idField.text + ".json").Then(response =>
        {
            user up = response;

            up = response;
            Debug.Log(up.nam);
            if (up.birt.Equals(pwField.text))
            {
                screen.SetActive(true);
                parent.SetActive(false);
                SoldierScreen1.soldnumber = idField.text;
            }
            else
            {
                msgbox.gameObject.SetActive(true);
                msgbox.openMessage("아이디 또는 패스워드가 일치하지 않습니다.");
            }
        });
    }