void clicked()
{
InventTable myInventTable;
InventTrans tmpInventTrans;
InventTableModule tmpInventTableModule;
VendTable tmpVendTable;
InventBatch tmpInventBatch;
SCI_Print_Label tmpSCI_Print_Label;
DictEnum dictEnum;
int enumValue;
int i = 1;
SCI_TmpPrintLabel TableTmpPrintLabel;
//ประกาศตัวแปร
FormStringControl strUnitId, strAccountNum, strBatchnumber, strMaterial, strSalesOder;
FormRealControl realQty;
FormDateControl dateDeliveryDate;
FormComboBoxControl intLabelSheet;
//FormStringControl intLabelSheet;
str urlfile;
;
//เก็บค่าใส่ตัวแปรที่ประกาศ
realQty = element.design().control(control::Qty);
strunitId = element.design().control(control::Unit);
straccountNum = element.design().control(control::AccountNum);
strbatchnumber = element.design().control(control::InventBacth);
strmaterial = element.design().control(control::Material);
dateDeliveryDate = element.design().control(control::DateEdit);
strSalesOder = element.design().control(control::SalesOrder);
intLabelSheet = element.design().control(control::LabelSheet);
dictEnum = new DictEnum(enumnum(LabelPerSheet));
EnumValue = dictEnum.name2Value(LabelPerSheet.valueStr());
TableTmpPrintLabel.clear();
TableTmpPrintLabel.ItemId = InventTable.ItemId;
TableTmpPrintLabel.ItemName = InventTable::find(TableTmpPrintLabel.ItemId).ItemName;
//เก็บข้อมูล ลง Table
TableTmpPrintLabel.Qty = realQty.realValue();
TableTmpPrintLabel.Unit = strUnitId.valueStr();
TableTmpPrintLabel.AccountNum = strAccountNum.valueStr();
TableTmpPrintLabel.BatchNum = strBatchnumber.valueStr();
TableTmpPrintLabel.Material = strMaterial.valueStr();
TableTmpPrintLabel.DeliveryDate = dateDeliveryDate.dateValue();
TableTmpPrintLabel.SaleOrder = strSalesOder.valueStr();
//TableTmpPrintLabel.LabelSheet = intLabelSheet.;
TableTmpPrintLabel.LabelSheet = EnumValue;
TableTmpPrintLabel.insert();
Button_Save.enabled(false);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น