private int MainInfoAppend(DateTime dt, Order order, int waPass, int waFail, string dstDir) { String errMsg = ""; string fileName = ""; var errCode = CommonConstants.ECODE_OK; var param = new MainTblAppendParam(); FileInfo fInfo = null; var mode = order.Mode; try { fileName = dstDir + "\\" + CommonConstants.LOT_DAT_STRING; if (File.Exists(fileName)) { fInfo = new FileInfo(fileName); } } catch (Exception ex) { } param.backup_date = dt; param.backup_pc = CommonConstants.BACKUP_PC_NAME[mode]; param.type_name = order.Item; param.lot_name = order.No; param.pass_chip_count = waPass; param.ng_chip_count = waFail; param.map_count = order.Quantity; param.send_flag = true; param.backup_path = dstDir; param.OPE_NAME = CommonConstants.OPE_NAME[mode]; param.OPE_SEQ = CommonConstants.OPE_SEQ; param.LAY_NO = CommonConstants.LAY_NO; param.INI_PASSCOUNT = CommonConstants.INI_PASSCOUNT; param.INI_MAP_COUNT = CommonConstants.INI_MAP_COUNT; if (fInfo != null) { param.file_modify = fInfo.LastWriteTime; } param.backup_path2 = order.Item + "\\" + order.No; if (sqlFunc.MainInfoAppend(param, ref errMsg) != CommonConstants.ECODE_OK) { errCode = CommonConstants.ECODE_ERROR; } return(errCode); }