|
@ -62,21 +62,6 @@ namespace AMES_AP |
|
|
UnitSelect.ValueMember = "Key"; |
|
|
UnitSelect.ValueMember = "Key"; |
|
|
|
|
|
|
|
|
GetLineSelect(); |
|
|
GetLineSelect(); |
|
|
//string apiUrl = "WebService_Entire.asmx/Get_LINE?CompanyID=01";
|
|
|
|
|
|
//var result = ApiHelper.GetMethod(apiUrl);
|
|
|
|
|
|
//dynamic[] Json = JsonConvert.DeserializeObject<JObject[]>(result);
|
|
|
|
|
|
//Json.Select(s => { s.LINENAME = s.LINEID + "-" + s.LINENAME; return s; }).ToList();
|
|
|
|
|
|
//ArrayList myline = new ArrayList();
|
|
|
|
|
|
//foreach (var item in Json.OrderBy(o => o.LINEID).ToList())
|
|
|
|
|
|
//{
|
|
|
|
|
|
// myline.Add(new DictionaryEntry(item.LINEID, item.LINENAME));
|
|
|
|
|
|
//}
|
|
|
|
|
|
//cbLine.DataSource = new BindingSource(myline, null);
|
|
|
|
|
|
//cbLine.DisplayMember = "Value";
|
|
|
|
|
|
//cbLine.ValueMember = "Key";
|
|
|
|
|
|
//// 預設C4
|
|
|
|
|
|
//int index = cbLine.FindString("C4");
|
|
|
|
|
|
//cbLine.SelectedIndex = index;
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
@ -125,18 +110,6 @@ namespace AMES_AP |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
private void btnChooseFile_Click(object sender, EventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
var aa = ApiHelper.GetMethod("api/WipInfos"); |
|
|
|
|
|
//DialogResult result = openFileDialog.ShowDialog();
|
|
|
|
|
|
//if (result == DialogResult.OK) // Test result.
|
|
|
|
|
|
//{
|
|
|
|
|
|
// lblFileName.Text = openFileDialog.FileName;
|
|
|
|
|
|
// //Do whatever you want
|
|
|
|
|
|
// //openFileDialog1.FileName .....
|
|
|
|
|
|
//}
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void UnitSelect_SelectionChangeCommitted(object sender, EventArgs e) |
|
|
private void UnitSelect_SelectionChangeCommitted(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
GetLineSelect(); |
|
|
GetLineSelect(); |
|
@ -290,6 +263,10 @@ namespace AMES_AP |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 工單基本資料
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="wipInfo"></param>
|
|
|
private void GetWipInfoData(WipInfo wipInfo) |
|
|
private void GetWipInfoData(WipInfo wipInfo) |
|
|
{ |
|
|
{ |
|
|
WipNo.Text = wipInfo.WipNO; |
|
|
WipNo.Text = wipInfo.WipNO; |
|
@ -357,11 +334,10 @@ namespace AMES_AP |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var result_wipBox = JsonConvert.DeserializeObject<WipBox>(query_wipBox); |
|
|
var result_wipBox = JsonConvert.DeserializeObject<WipBox>(query_wipBox); |
|
|
var result = true; |
|
|
|
|
|
if (result_wipBox == null) |
|
|
if (result_wipBox == null) |
|
|
result = ApiHelper.PostInsertMethod("api/WipBox", JsonConvert.SerializeObject(wipBox)); |
|
|
ApiHelper.PostInsertMethod("api/WipBox", JsonConvert.SerializeObject(wipBox)); |
|
|
else |
|
|
else |
|
|
result = ApiHelper.PutMethod("api/WipBox", JsonConvert.SerializeObject(wipBox)); |
|
|
ApiHelper.PutMethod("api/WipBox", JsonConvert.SerializeObject(wipBox)); |
|
|
|
|
|
|
|
|
// 自動裝箱
|
|
|
// 自動裝箱
|
|
|
if (checkbox) |
|
|
if (checkbox) |
|
@ -400,7 +376,7 @@ namespace AMES_AP |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var result = ApiHelper.PutMethod("api/WipBox", JsonConvert.SerializeObject(wipBox)); |
|
|
ApiHelper.PutMethod("api/WipBox", JsonConvert.SerializeObject(wipBox)); |
|
|
|
|
|
|
|
|
string BoxNoOrder = NowBoxNo.Text.Substring(NowBoxNo.Text.Length - 3, 3); |
|
|
string BoxNoOrder = NowBoxNo.Text.Substring(NowBoxNo.Text.Length - 3, 3); |
|
|
BoxNoOrder = (int.Parse(BoxNoOrder) + 1).ToString().PadLeft(3, '0'); |
|
|
BoxNoOrder = (int.Parse(BoxNoOrder) + 1).ToString().PadLeft(3, '0'); |
|
|