bool SubmitResult_lineleader(double dValue) { string strTaskCode, strMac; string remark = DatabaseFunc.Context.ContextData["Key1"].ToString() + ",线长上传"; try { if (!DatabaseFunc.GetInfo(m_strSN, out strTaskCode, out strMac)) { ShowResult("获取工单信息失败", eState.eFail); return(false); } if (!DatabaseFunc.SaveResult_Weight("", strTaskCode, strMac, m_strSN, dValue.ToString("f4"), remark)) { ShowResult("上传测试记录失败", eState.eFail); return(false); } return(true); } catch (System.Exception ex) { MessageBox.Show(ex.Message); return(false); } }
bool SubmitResult(double dValue) { string strTaskCode, strMac; string remark = "Down:" + txtDown.Text + ",Up:" + txtUp.Text; try { if (!DatabaseFunc.GetInfo(m_strSN, out strTaskCode, out strMac)) { ShowResult("获取工单信息失败", eState.eFail); return(false); } if (!DatabaseFunc.SaveResult_Weight("", strTaskCode, strMac, m_strSN, dValue.ToString("f4"), remark)) { ShowResult("上传测试记录失败", eState.eFail); return(false); } return(true); } catch (System.Exception ex) { MessageBox.Show(ex.Message); return(false); } }
bool SubmitResult_math(double dValue, out double fweight_c, out int fweight_num) { string strTaskCode, strMac; fweight_c = 0; fweight_num = 0; string remark = "称重计算产品"; try { if (!DatabaseFunc.GetInfo(m_strSN, out strTaskCode, out strMac)) { ShowResult("获取工单信息失败", eState.eFail); return(false); } if (!DatabaseFunc.SaveResult_Weight("", strTaskCode, strMac, m_strSN, dValue.ToString("f4"), remark)) { ShowResult("上传测试记录失败", eState.eFail); return(false); } if (!DatabaseFunc.GetWeight_coefficient(strTaskCode, out fweight_c)) { ShowResult("获取称重系数失败", eState.eFail); return(false); } if (!DatabaseFunc.GetWeight_num(strTaskCode, out fweight_num)) { ShowResult("获取称重个数失败", eState.eFail); return(false); } return(true); } catch (System.Exception ex) { MessageBox.Show(ex.Message); return(false); } }