📄 plateusedinput.h
字号:
textlot->Text="";
textSerialStart->Text="";
textSerialEnd->Text="";
DataSet * dSetTmp;
String * strSQL;
//strSQL = S"select LINE_CODE,LINE_NAME from LINE_MST ";
begin();
//班次
strSQL = S" Select ";
strSQL = String::Concat(strSQL,S" PROCESS_NO, ");
strSQL = String::Concat(strSQL,S" TEAM ");
strSQL = String::Concat(strSQL,S" from ");
strSQL = String::Concat(strSQL,S" TEAM_MST ");
strSQL = String::Concat(strSQL,S" where ");
strSQL = String::Concat(strSQL,S" PROCESS_NO = ");
strSQL = String::Concat(strSQL,S"'",sProcess,S"'");
if (!DBBPlateList->blnCnnOpen())
{
return;
}
dSetTmp = DBBPlateList->dSetSQL_Select(strSQL,S"TEAM_MST",1);
combTeam->DataSource = dSetTmp->Tables->Item[S"TEAM_MST"];
combTeam->DisplayMember = S"TEAM";
txtToday->Text=System::DateTime::Now.ToString();
SdayTime= String::Format("{0:yyyy-MM-dd}",__box(DateTime::Today) );
//线
strSQL = S" select ";
strSQL = String::Concat(strSQL,S" LINE_CODE, ");
strSQL = String::Concat(strSQL,S" LINE_NAME ");
strSQL = String::Concat(strSQL,S" from ");
strSQL = String::Concat(strSQL,S" LINE_MST ");
dSetTmp = DBBPlateList->dSetSQL_Select(strSQL,S"LINE_MST",1);
combLine->DataSource = dSetTmp->Tables->Item[S"LINE_MST"];
combLine->DisplayMember = S"LINE_NAME";
combTeam->SelectedIndex=iGroup-1;
combLine->SelectedIndex=0;
}
private: System::Void combTeam_SelectedIndexChanged(System::Object * sender, System::EventArgs * e)
{
}
private: System::Void textProductName_KeyPress(System::Object * sender, System::Windows::Forms::KeyPressEventArgs * e)
{
if( e->KeyChar ==(char)13)
{
String *strckfsmqoo __gc[];
String *strinput;
Char strchars[]={'/'};
//PARTS_MST 里面是否存在部品
if (strGetPARTSMST(textProductName->Text,oInf->intLang,DBBPlateList)==false)
{
MessageBox::Show(abc[0],S"PlateUsedInput",MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
textQTY->Focus();
return;
}
strinput=PlateUsedInput::strGetProName(textProductName->Text,oInf->intLang,DBBPlateList);
strckfsmqoo=strinput->Split(strchars);
if (strckfsmqoo->Length!=1)
{
txtProName->Text = strckfsmqoo[0];
textlot->Text=strckfsmqoo[1];
textSerialStart->Text=strckfsmqoo[2];
textSerialEnd->Text =strckfsmqoo[3];
}
}
}
private: System::Void textQTY_KeyPress(System::Object * sender, System::Windows::Forms::KeyPressEventArgs * e)
{
if( e->KeyChar ==(char)13)
{
if (isNumber(textQTY->Text)==false)
{
MessageBox::Show(abc[1],S"PlateUsedInput",MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
textQTY->Focus();
return;
}
int strQTY;
strQTY=System::Int32::Parse(textQTY->Text);
//数量是否等于连续号码数量
if (strQTY!=((System::Int32::Parse(textSerialEnd->Text))-(System::Int32::Parse(textSerialStart->Text))+1)==true)
{
MessageBox::Show(abc[2],S"PlateUsedInput",MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
textQTY->Focus();
return;
}
//实际生产数量
if (strGetPRODUCTRESULTDATA(textProductName->Text,oInf->intLang,DBBPlateList)==false)
{
MessageBox::Show(abc[3],S"PlateUsedInput",MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
textQTY->Focus();
return;
}
}
}
private: System::Void button3_Click(System::Object * sender, System::EventArgs * e)
{
if (String::Equals(textQTY->Text,"")==true)
{
MessageBox::Show(abc[4],S"PlateUsedInput",MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
textQTY->Focus();
return;
}
DBBRstInExec= new DBBase();
if (!DBBRstInExec->blnCnnOpen())
{
MessageBox::Show(S"Open DataBase Failed!");
return;
}
DBBRstInExec->blnBeginTrans();
String *selectedtym=combLine->Text;
strcombLine=PlateUsedInput::strGetLineName(selectedtym,DBBPlateList);
if (strUpdatePLATEDATA()==false)
{
DBBRstInExec->blnRollBack();
MessageBox::Show(abc[4]);
return;
}
if (strUpdatePRODUCTRESULTDATA()==false)
{
DBBRstInExec->blnRollBack();
MessageBox::Show(abc[5]);
return;
}
DBBRstInExec->blnCommit();
MessageBox::Show(abc[6]);
}
private: System::Void combLine_SelectedIndexChanged(System::Object * sender, System::EventArgs * e)
{
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -