작업 조건 분석 검색 기능 개발
This commit is contained in:
@@ -5,6 +5,8 @@ using WI;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using System;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Menu;
|
||||
using System.Globalization;
|
||||
|
||||
namespace CHN
|
||||
{
|
||||
@@ -21,12 +23,15 @@ namespace CHN
|
||||
|
||||
private UI_Calendar ui_Calendar;
|
||||
|
||||
HTTPTest hTTPTest;
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
ui_Calendar = transform.GetComponentInChildren<UI_Calendar>();
|
||||
Button_Close.onClick.AddListener(() => SetActive(false));
|
||||
Button_StartDay.onClick.AddListener(OnClickStartDayBtn);
|
||||
Button_EndDay.onClick.AddListener(OnClickEndDayBtn);
|
||||
Button_Search.onClick.AddListener(OnClickSearchBtn);
|
||||
|
||||
ui_Calendar.Close();
|
||||
|
||||
@@ -36,6 +41,30 @@ namespace CHN
|
||||
SetActive(false);
|
||||
}
|
||||
|
||||
private void SetFacilityDropDown()
|
||||
{
|
||||
hTTPTest = FindObjectOfType<HTTPTest>();
|
||||
|
||||
if (hTTPTest == null)
|
||||
return;
|
||||
|
||||
Dropdown_Facility.ClearOptions();
|
||||
|
||||
string[] data = hTTPTest.workConditionFacilityData.data;
|
||||
|
||||
List<TMP_Dropdown.OptionData> optionList = new List<TMP_Dropdown.OptionData>();
|
||||
|
||||
foreach (string str in data)
|
||||
{
|
||||
optionList.Add(new TMP_Dropdown.OptionData(str));
|
||||
}
|
||||
|
||||
Dropdown_Facility.AddOptions(optionList);
|
||||
Dropdown_Facility.value = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void OnClickStartDayBtn()
|
||||
{
|
||||
ui_Calendar.Open(Text_StartDay);
|
||||
@@ -44,10 +73,24 @@ namespace CHN
|
||||
private void OnClickEndDayBtn()
|
||||
{
|
||||
ui_Calendar.Open(Text_EndDay);
|
||||
}
|
||||
|
||||
private void OnClickSearchBtn()
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(Text_StartDay.text);
|
||||
DateTime endDate = Convert.ToDateTime(Text_EndDay.text);
|
||||
|
||||
string startDateString = startDate.ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||
string endDateString = endDate.ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||
string MCHCD = Dropdown_Facility.options[Dropdown_Facility.value].text;
|
||||
string WO = InputField_WorkOrderNumber.text;
|
||||
|
||||
hTTPTest.WorkTimeInQuiry(startDateString, endDateString, MCHCD, WO);
|
||||
}
|
||||
|
||||
public void Open()
|
||||
{
|
||||
SetFacilityDropDown();
|
||||
SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user