/// <summary> /// 修改自定义项目 /// </summary> /// <param name="p_objCheckItemCustomVO"></param> public void m_mthUpdateCheckItemCustom(clsLisCheckItemCustom p_objCheckItemCustomVO) { long lngRes = 0; lngRes = m_objDomain.m_lngUpdateCheckItemCustom(p_objCheckItemCustomVO); if (lngRes > 0) { m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chCheckItemId"].Value = p_objCheckItemCustomVO.m_strCheckItemID; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chCheckItemName"].Value = p_objCheckItemCustomVO.m_strCheckItemName; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chPosMax"].Value = p_objCheckItemCustomVO.m_strPosMaxValue; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chPosMin"].Value = p_objCheckItemCustomVO.m_strPosMinValue; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chNegMax"].Value = p_objCheckItemCustomVO.m_strNegMaxValue; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chNegMin"].Value = p_objCheckItemCustomVO.m_strNegMinValue; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_cheformula"].Value = p_objCheckItemCustomVO.m_strformula; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chNum"].Value = p_objCheckItemCustomVO.m_strSeq_chr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chNcQCMaxValue"].Value = p_objCheckItemCustomVO.m_strQc_Neg_Maxvalue_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chNCQCMinValue"].Value = p_objCheckItemCustomVO.m_strQc_Neg_Minvalue_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chPCQCMaxValue"].Value = p_objCheckItemCustomVO.m_strQc_Pos_Maxvalue_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chPCQCMinValue"].Value = p_objCheckItemCustomVO.m_strQc_Pos_Minvalue_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chCOFormula"].Value = p_objCheckItemCustomVO.m_strQCFormula_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chQCFormula"].Value = p_objCheckItemCustomVO.m_strQc_Result_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chrMoreNCFormula"].Value = p_objCheckItemCustomVO.m_strMore_Neg_Formula_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chMorePCFormula"].Value = p_objCheckItemCustomVO.m_strMore_Pos_Formula_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chQCNCFormula"].Value = p_objCheckItemCustomVO.m_strQc_Neg_Formula_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["m_chQCPCFormula"].Value = p_objCheckItemCustomVO.m_strQc_Pos_Formula_vchr; m_objViewer.m_dgCheckItemCustom.SelectedRows[0].Cells["Tag"].Value = p_objCheckItemCustomVO; } }
public void m_mthOperationCheckItemCustom() { clsLisCheckItemCustom objCheckItemCustomVO = new clsLisCheckItemCustom(); objCheckItemCustomVO.m_strCheckItemID = m_objViewer.m_cboDeviceCheckItem.SelectedValue.ToString(); objCheckItemCustomVO.m_strCheckItemName = m_objViewer.m_cboDeviceCheckItem.Text; objCheckItemCustomVO.m_strPosMaxValue = m_objViewer.m_txtPCMaxValue.Text; objCheckItemCustomVO.m_strPosMinValue = m_objViewer.m_txtPCMinValue.Text; objCheckItemCustomVO.m_strNegMaxValue = m_objViewer.m_txtNCMaxValue.Text; objCheckItemCustomVO.m_strNegMinValue = m_objViewer.m_txtNCMinValue.Text; objCheckItemCustomVO.m_strSeq_chr = m_objViewer.m_txtSeq.Text; objCheckItemCustomVO.m_strQCFormula_vchr = m_objViewer.m_txtCOFormula.Text; objCheckItemCustomVO.m_strQc_Neg_Maxvalue_vchr = m_objViewer.m_txtQCNCMaxValue.Text; objCheckItemCustomVO.m_strQc_Neg_Minvalue_vchr = m_objViewer.m_txtQCNCMinvalue.Text; objCheckItemCustomVO.m_strQc_Pos_Maxvalue_vchr = m_objViewer.m_txtQCPCMaxvalue.Text; objCheckItemCustomVO.m_strQc_Pos_Minvalue_vchr = m_objViewer.m_txtQCPCMinvalue.Text; objCheckItemCustomVO.m_strQc_Result_vchr = m_objViewer.m_txtQCResultFromula.Text; objCheckItemCustomVO.m_strColor = m_objViewer.m_txtColor.BackColor.R.ToString() + ":" + m_objViewer.m_txtColor.BackColor.G.ToString() + ":" + m_objViewer.m_txtColor.BackColor.B.ToString(); objCheckItemCustomVO.m_strformula = m_objViewer.m_txtCutoff.Text; objCheckItemCustomVO.m_strMore_Neg_Formula_vchr = m_objViewer.m_txtMoreNCFormula.Text; objCheckItemCustomVO.m_strMore_Pos_Formula_vchr = m_objViewer.m_txtMorePCFormula.Text; objCheckItemCustomVO.m_strQc_Neg_Formula_vchr = m_objViewer.m_txtQCNCFormula.Text; objCheckItemCustomVO.m_strQc_Pos_Formula_vchr = m_objViewer.m_txtQCPCFormula.Text; long lngRes = 0; if (m_objViewer.m_txtCutoff.Tag != null) { m_mthUpdateCheckItemCustom(objCheckItemCustomVO); } else { m_mthInsertCheckItemCustom(objCheckItemCustomVO); } }
/// <summary> /// 添加自定义项目 /// </summary> /// <param name="p_objCheckItemCustomVO"></param> /// <returns></returns> public long m_lngInsertCheckItemCustom(clsLisCheckItemCustom p_objCheckItemCustomVO) { long lngRes = 0; clsItemSetSvc objSvc = (clsItemSetSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsItemSetSvc)); lngRes = objSvc.m_lngInsertCheckItemCustom(objPrincipal, p_objCheckItemCustomVO); return(lngRes); }
/// <summary> /// 添加自定义项目 /// </summary> /// <param name="p_objCheckItemCustomVO"></param> public void m_mthInsertCheckItemCustom(clsLisCheckItemCustom p_objCheckItemCustomVO) { long lngRes = 0; lngRes = m_objDomain.m_lngInsertCheckItemCustom(p_objCheckItemCustomVO); if (lngRes > 0) { m_objViewer.m_dgCheckItemCustom.Rows.Add(new object[] { p_objCheckItemCustomVO.m_strCheckItemName, p_objCheckItemCustomVO.m_strPosMaxValue, p_objCheckItemCustomVO.m_strPosMinValue, p_objCheckItemCustomVO.m_strNegMaxValue, p_objCheckItemCustomVO.m_strNegMinValue, p_objCheckItemCustomVO.m_strformula, p_objCheckItemCustomVO.m_strSeq_chr, p_objCheckItemCustomVO.m_strQc_Neg_Maxvalue_vchr, p_objCheckItemCustomVO.m_strQc_Neg_Minvalue_vchr, p_objCheckItemCustomVO.m_strQc_Pos_Maxvalue_vchr , p_objCheckItemCustomVO.m_strQc_Pos_Minvalue_vchr, p_objCheckItemCustomVO.m_strQCFormula_vchr, p_objCheckItemCustomVO.m_strQc_Result_vchr, p_objCheckItemCustomVO.m_strMore_Neg_Formula_vchr, p_objCheckItemCustomVO.m_strMore_Pos_Formula_vchr, p_objCheckItemCustomVO.m_strQc_Neg_Formula_vchr, p_objCheckItemCustomVO.m_strQc_Pos_Formula_vchr, p_objCheckItemCustomVO.m_strCheckItemID, p_objCheckItemCustomVO }); } }
private void m_dgCheckItemCustom_SelectionChanged(object sender, EventArgs e) { if (m_dgCheckItemCustom.SelectedRows.Count <= 0) { return; } clsLisCheckItemCustom objCheckItemCustomVO = (clsLisCheckItemCustom)m_dgCheckItemCustom.SelectedRows[0].Cells["Tag"].Value; clsCheckItem_VO objCheckItemVO = new clsCheckItem_VO(); m_strCheckItemID = objCheckItemCustomVO.m_strCheckItemID; m_cboDeviceCheckItem.SelectedValue = objCheckItemCustomVO.m_strCheckItemID; m_txtPCMaxValue.Text = objCheckItemCustomVO.m_strPosMaxValue; m_txtPCMinValue.Text = objCheckItemCustomVO.m_strPosMinValue; m_txtNCMaxValue.Text = objCheckItemCustomVO.m_strNegMaxValue; m_txtNCMinValue.Text = objCheckItemCustomVO.m_strNegMinValue; m_txtSeq.Text = objCheckItemCustomVO.m_strSeq_chr; m_txtCOFormula.Text = objCheckItemCustomVO.m_strQCFormula_vchr; m_txtCutoff.Text = objCheckItemCustomVO.m_strformula; m_txtCutoff.Tag = objCheckItemCustomVO; m_txtColor.BackColor = Color.FromArgb(255, 255, 255); m_txtQCNCMaxValue.Text = objCheckItemCustomVO.m_strQc_Neg_Maxvalue_vchr; m_txtQCNCMinvalue.Text = objCheckItemCustomVO.m_strQc_Neg_Minvalue_vchr; m_txtQCPCMaxvalue.Text = objCheckItemCustomVO.m_strQc_Pos_Maxvalue_vchr; m_txtQCPCMinvalue.Text = objCheckItemCustomVO.m_strQc_Pos_Minvalue_vchr; m_txtQCResultFromula.Text = objCheckItemCustomVO.m_strQc_Result_vchr; string[] m_strColorArr = objCheckItemCustomVO.m_strColor.Split(new char[] { ':', '\r', '\n' }); if (m_strColorArr != null) { if (m_strColorArr.Length == 3) { int iR = Convert.ToInt32(m_strColorArr[0]); int iG = Convert.ToInt32(m_strColorArr[1]); int iB = Convert.ToInt32(m_strColorArr[2]); m_txtColor.BackColor = Color.FromArgb(iR, iG, iB); } } m_txtNo.Text = "1"; m_txtMorePCFormula.Text = objCheckItemCustomVO.m_strMore_Pos_Formula_vchr; m_txtMoreNCFormula.Text = objCheckItemCustomVO.m_strMore_Neg_Formula_vchr; m_txtQCNCFormula.Text = objCheckItemCustomVO.m_strQc_Neg_Formula_vchr; m_txtQCPCFormula.Text = objCheckItemCustomVO.m_strQc_Pos_Formula_vchr; m_objController.m_mthGetCheckItemCustomRes(); }