/// <summary> /// 添加 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simpleButton1_Click(object sender, EventArgs e) { Mod_TQC_COMPRE_ITEM_RESULT modResult = bllTqcCompreItemResult.GetModel(strBatch, strGZ, strBZ); if (modResult != null) { Mod_TQB_DESIGN_ITEM modDesign = bllTqbDesignItem.GetModel(modResult.C_DESIGN_NO, str_CHARACTER_ID); if (modDesign == null) { MessageBox.Show("标准中没有找到正要添加的这项!"); return; } else { Mod_TQC_COMPRE_ITEM_RESULT model = new Mod_TQC_COMPRE_ITEM_RESULT(); model.C_STOVE = modResult.C_STOVE; model.C_BATCH_NO = modResult.C_BATCH_NO; model.C_STL_GRD = modResult.C_STL_GRD; model.C_SPEC = modResult.C_SPEC; model.C_STD_CODE = modResult.C_STD_CODE; model.C_CHARACTER_ID = str_CHARACTER_ID; model.C_ITEM_NAME = btn_Name.Text; model.C_TYPE = modDesign.C_TYPE; model.C_UNIT = modDesign.C_UNIT; model.C_QUANTITATIVE = modDesign.C_QUANTITATIVE; model.C_VALUE = txt_Value.Text; model.C_CHECK_STATE = "0"; model.C_EMP_ID = RV.UI.UserInfo.userID; model.C_DESIGN_NO = modResult.C_DESIGN_NO; model.N_PRINT_ORDER = modDesign.N_PRINT_ORDER; model.C_IS_SHOW = modDesign.C_IS_PRINT; model.C_IS_DECIDE = modDesign.C_IS_DECIDE; if (modDesign.C_TYPE == "成分") { model.C_GROUP = "1"; } else { int i_Group = bllTqcCompreItemResult.Get_Max_Group(modResult.C_BATCH_NO, modResult.C_STOVE, modResult.C_STL_GRD, modResult.C_STD_CODE, str_CHARACTER_ID); model.C_GROUP = (i_Group + 1).ToString(); } model.C_SOURCE = "1"; if (bllTqcCompreItemResult.Add(model)) { MessageBox.Show("添加成功!"); this.Close(); } } } else { MessageBox.Show("没有找到质量设计信息!"); return; } }
/// <summary> /// 添加成分明细信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Add_CF_Click(object sender, EventArgs e) { try { DataRow dr = this.gv_JCSJ.GetDataRow(this.gv_JCSJ.FocusedRowHandle); if (dr == null) { return; } Mod_TQB_DESIGN_ITEM mod = new Mod_TQB_DESIGN_ITEM(); mod.C_DESIGN_ID = str_id; mod.C_CHARACTER_ID = dr["C_ID"].ToString(); Mod_TQB_CHARACTER mod_character = bll_CharaCter.GetModel(mod.C_CHARACTER_ID); if (mod_character.C_NAME == "C")//检测是否添加‘碳硅锰磷硫’ { mod.N_PRINT_ORDER = 1; } else if (mod_character.C_NAME == "Si")//检测是否添加‘碳硅锰磷硫’ { mod.N_PRINT_ORDER = 2; } else if (mod_character.C_NAME == "Mn")//检测是否添加‘碳硅锰磷硫’ { mod.N_PRINT_ORDER = 3; } else if (mod_character.C_NAME == "P")//检测是否添加‘碳硅锰磷硫’ { mod.N_PRINT_ORDER = 4; } else if (mod_character.C_NAME == "S")//检测是否添加‘碳硅锰磷硫’ { mod.N_PRINT_ORDER = 5; } else if (mod_character.C_NAME == "Al")//检测是否添加‘碳硅锰磷硫’ { mod.N_PRINT_ORDER = 6; } //mod.C_TYPE = "成分"; string strTypeName = bll_CheckType.Get_Type_Name(mod_character.C_TYPE_ID); mod.C_TYPE = strTypeName; mod.C_EMP_ID = RV.UI.UserInfo.UserID; if (bll_Design_Item.Add(mod)) { GetDesignLog_Add(); } NewMethod_CF();// 查询执行标准 成分 MessageBox.Show("添加成功!"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQB_DESIGN_ITEM GetModel(string c_design_no, string c_character_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_DESIGN_ID,C_CHARACTER_ID,C_TARGET_MIN,C_TARGET_INTERVAL,C_TARGET_MAX,C_PREWARNING_VALUE,C_TYPE,C_IS_DECIDE,C_IS_PRINT,N_PRINT_ORDER,N_SPEC_MIN,C_SPEC_INTERVAL,N_SPEC_MAX,C_FORMULA,C_UNIT,N_DIGIT,C_QUANTITATIVE,C_TEST_TEM,C_TEST_CONDITION,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT from TQB_DESIGN_ITEM t "); strSql.Append(" where substr(t.c_design_id,3)='" + c_design_no + "' and t.c_character_id='" + c_character_id + "' and rownum=1 "); Mod_TQB_DESIGN_ITEM model = new Mod_TQB_DESIGN_ITEM(); DataSet ds = DbHelperOra.Query(strSql.ToString()); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQB_DESIGN_ITEM GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_DESIGN_ID,C_CHARACTER_ID,C_TARGET_MIN,C_TARGET_INTERVAL,C_TARGET_MAX,C_PREWARNING_VALUE,C_TYPE,C_IS_DECIDE,C_IS_PRINT,N_PRINT_ORDER,N_SPEC_MIN,C_SPEC_INTERVAL,N_SPEC_MAX,C_FORMULA,C_UNIT,N_DIGIT,C_QUANTITATIVE,C_TEST_TEM,C_TEST_CONDITION,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT from TQB_DESIGN_ITEM "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQB_DESIGN_ITEM model = new Mod_TQB_DESIGN_ITEM(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Update_CF_Click(object sender, EventArgs e) { try { for (int i = 0; i < gv_StdCF.DataRowCount; i++) { DataRow dr = this.gv_StdCF.GetDataRow(i); if (dr == null) { return; } Mod_TQB_DESIGN_ITEM mod = bll_Design_Item.GetModel(dr["C_ID"].ToString()); #region 目标值区间 if (!string.IsNullOrEmpty(dr["C_TARGET_INTERVAL"].ToString())) { mod.C_TARGET_INTERVAL = dr["C_TARGET_INTERVAL"].ToString(); if (dr["C_TARGET_INTERVAL"].ToString() == "≤E") { if (string.IsNullOrEmpty(dr["C_TARGET_MIN"].ToString())) { MessageBox.Show("请填写目标最小值!"); return; } else { mod.C_TARGET_MIN = dr["C_TARGET_MIN"].ToString();//目标最小值 } } else if (dr["C_TARGET_INTERVAL"].ToString() == "≤E≤") { if (string.IsNullOrEmpty(dr["C_TARGET_MIN"].ToString())) { MessageBox.Show("请填写目标最小值!"); return; } if (string.IsNullOrEmpty(dr["C_TARGET_MAX"].ToString())) { MessageBox.Show("请填写目标最大值!"); return; } mod.C_TARGET_MIN = dr["C_TARGET_MIN"].ToString(); //目标最小值 mod.C_TARGET_MAX = dr["C_TARGET_MAX"].ToString(); //目标最大值 } else if (dr["C_TARGET_INTERVAL"].ToString() == "E≤") { if (string.IsNullOrEmpty(dr["C_TARGET_MAX"].ToString())) { MessageBox.Show("请填写目标最大值!"); return; } else { mod.C_TARGET_MAX = dr["C_TARGET_MAX"].ToString();//目标最大值 } } } #endregion mod.C_PREWARNING_VALUE = dr["C_PREWARNING_VALUE"].ToString(); #region 规格区间 if (!string.IsNullOrEmpty(dr["C_SPEC_INTERVAL"].ToString())) { mod.C_SPEC_INTERVAL = dr["C_SPEC_INTERVAL"].ToString(); if (dr["C_SPEC_INTERVAL"].ToString() == "≤E") { if (string.IsNullOrEmpty(dr["N_SPEC_MIN"].ToString())) { MessageBox.Show("请填写规格最小值!"); return; } else { mod.N_SPEC_MIN = Convert.ToDecimal(dr["N_SPEC_MIN"]);//规格最小值 } } else if (dr["C_SPEC_INTERVAL"].ToString() == "≤E≤") { if (string.IsNullOrEmpty(dr["N_SPEC_MIN"].ToString())) { MessageBox.Show("请填写规格最小值!"); return; } if (string.IsNullOrEmpty(dr["N_SPEC_MAX"].ToString())) { MessageBox.Show("请填写规格最大值!"); return; } mod.N_SPEC_MIN = Convert.ToDecimal(dr["N_SPEC_MIN"]); //规格最小值 mod.N_SPEC_MAX = Convert.ToDecimal(dr["N_SPEC_MAX"]); //规格最大值 } else if (dr["C_SPEC_INTERVAL"].ToString() == "E≤") { if (string.IsNullOrEmpty(dr["N_SPEC_MAX"].ToString())) { MessageBox.Show("请填写规格最大值!"); return; } else { mod.N_SPEC_MAX = Convert.ToDecimal(dr["N_SPEC_MAX"]);//规格最大值 } } } #endregion if (!string.IsNullOrEmpty(dr["N_PRINT_ORDER"].ToString())) { mod.N_PRINT_ORDER = Convert.ToDecimal(dr["N_PRINT_ORDER"]); } mod.C_QUANTITATIVE = dr["C_QUANTITATIVE"].ToString(); mod.C_FORMULA = dr["C_FORMULA"].ToString(); mod.C_UNIT = dr["C_UNIT"].ToString(); if (!string.IsNullOrEmpty(dr["N_DIGIT"].ToString())) { mod.N_DIGIT = Convert.ToDecimal(dr["N_DIGIT"]); } mod.C_IS_DECIDE = dr["C_IS_DECIDE"].ToString(); mod.C_IS_PRINT = dr["C_IS_PRINT"].ToString(); mod.C_TEST_TEM = dr["C_TEST_TEM"].ToString(); mod.C_TEST_CONDITION = dr["C_TEST_CONDITION"].ToString(); mod.C_REMARK = dr["C_REMARK"].ToString(); mod.C_EMP_ID = RV.UI.UserInfo.UserID; mod.D_MOD_DT = RV.UI.ServerTime.timeNow(); if (bll_Design_Item.Update(mod)) { GetDesignLog_Add(); } } NewMethod_CF();// 查询执行标准 成分 MessageBox.Show("修改成功!"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Mod_TQB_DESIGN_ITEM model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into TQB_DESIGN_ITEM("); strSql.Append("C_DESIGN_ID,C_CHARACTER_ID,C_TARGET_MIN,C_TARGET_INTERVAL,C_TARGET_MAX,C_PREWARNING_VALUE,C_TYPE,C_IS_DECIDE,C_IS_PRINT,N_PRINT_ORDER,N_SPEC_MIN,C_SPEC_INTERVAL,N_SPEC_MAX,C_FORMULA,C_UNIT,N_DIGIT,C_QUANTITATIVE,C_TEST_TEM,C_TEST_CONDITION,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT)"); strSql.Append(" values ("); strSql.Append(":C_DESIGN_ID,:C_CHARACTER_ID,:C_TARGET_MIN,:C_TARGET_INTERVAL,:C_TARGET_MAX,:C_PREWARNING_VALUE,:C_TYPE,:C_IS_DECIDE,:C_IS_PRINT,:N_PRINT_ORDER,:N_SPEC_MIN,:C_SPEC_INTERVAL,:N_SPEC_MAX,:C_FORMULA,:C_UNIT,:N_DIGIT,:C_QUANTITATIVE,:C_TEST_TEM,:C_TEST_CONDITION,:N_STATUS,:C_REMARK,:C_EMP_ID,:D_MOD_DT)"); OracleParameter[] parameters = { new OracleParameter(":C_DESIGN_ID", OracleDbType.Varchar2, 100), new OracleParameter(":C_CHARACTER_ID", OracleDbType.Varchar2, 100), new OracleParameter(":C_TARGET_MIN", OracleDbType.Varchar2, 100), new OracleParameter(":C_TARGET_INTERVAL", OracleDbType.Varchar2, 100), new OracleParameter(":C_TARGET_MAX", OracleDbType.Varchar2, 100), new OracleParameter(":C_PREWARNING_VALUE", OracleDbType.Varchar2, 100), new OracleParameter(":C_TYPE", OracleDbType.Varchar2, 100), new OracleParameter(":C_IS_DECIDE", OracleDbType.Varchar2, 100), new OracleParameter(":C_IS_PRINT", OracleDbType.Varchar2, 100), new OracleParameter(":N_PRINT_ORDER", OracleDbType.Decimal, 5), new OracleParameter(":N_SPEC_MIN", OracleDbType.Decimal, 15), new OracleParameter(":C_SPEC_INTERVAL", OracleDbType.Varchar2, 100), new OracleParameter(":N_SPEC_MAX", OracleDbType.Decimal, 15), new OracleParameter(":C_FORMULA", OracleDbType.Varchar2, 100), new OracleParameter(":C_UNIT", OracleDbType.Varchar2, 100), new OracleParameter(":N_DIGIT", OracleDbType.Decimal, 1), new OracleParameter(":C_QUANTITATIVE", OracleDbType.Varchar2, 100), new OracleParameter(":C_TEST_TEM", OracleDbType.Varchar2, 100), new OracleParameter(":C_TEST_CONDITION", OracleDbType.Varchar2, 100), new OracleParameter(":N_STATUS", OracleDbType.Decimal, 1), new OracleParameter(":C_REMARK", OracleDbType.Varchar2, 500), new OracleParameter(":C_EMP_ID", OracleDbType.Varchar2, 100), new OracleParameter(":D_MOD_DT", OracleDbType.Date) }; parameters[0].Value = model.C_DESIGN_ID; parameters[1].Value = model.C_CHARACTER_ID; parameters[2].Value = model.C_TARGET_MIN; parameters[3].Value = model.C_TARGET_INTERVAL; parameters[4].Value = model.C_TARGET_MAX; parameters[5].Value = model.C_PREWARNING_VALUE; parameters[6].Value = model.C_TYPE; parameters[7].Value = model.C_IS_DECIDE; parameters[8].Value = model.C_IS_PRINT; parameters[9].Value = model.N_PRINT_ORDER; parameters[10].Value = model.N_SPEC_MIN; parameters[11].Value = model.C_SPEC_INTERVAL; parameters[12].Value = model.N_SPEC_MAX; parameters[13].Value = model.C_FORMULA; parameters[14].Value = model.C_UNIT; parameters[15].Value = model.N_DIGIT; parameters[16].Value = model.C_QUANTITATIVE; parameters[17].Value = model.C_TEST_TEM; parameters[18].Value = model.C_TEST_CONDITION; parameters[19].Value = model.N_STATUS; parameters[20].Value = model.C_REMARK; parameters[21].Value = model.C_EMP_ID; parameters[22].Value = model.D_MOD_DT; int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQB_DESIGN_ITEM DataRowToModel(DataRow row) { Mod_TQB_DESIGN_ITEM model = new Mod_TQB_DESIGN_ITEM(); if (row != null) { if (row["C_ID"] != null) { model.C_ID = row["C_ID"].ToString(); } if (row["C_DESIGN_ID"] != null) { model.C_DESIGN_ID = row["C_DESIGN_ID"].ToString(); } if (row["C_CHARACTER_ID"] != null) { model.C_CHARACTER_ID = row["C_CHARACTER_ID"].ToString(); } if (row["C_TARGET_MIN"] != null) { model.C_TARGET_MIN = row["C_TARGET_MIN"].ToString(); } if (row["C_TARGET_INTERVAL"] != null) { model.C_TARGET_INTERVAL = row["C_TARGET_INTERVAL"].ToString(); } if (row["C_TARGET_MAX"] != null) { model.C_TARGET_MAX = row["C_TARGET_MAX"].ToString(); } if (row["C_PREWARNING_VALUE"] != null) { model.C_PREWARNING_VALUE = row["C_PREWARNING_VALUE"].ToString(); } if (row["C_TYPE"] != null) { model.C_TYPE = row["C_TYPE"].ToString(); } if (row["C_IS_DECIDE"] != null) { model.C_IS_DECIDE = row["C_IS_DECIDE"].ToString(); } if (row["C_IS_PRINT"] != null) { model.C_IS_PRINT = row["C_IS_PRINT"].ToString(); } if (row["N_PRINT_ORDER"] != null && row["N_PRINT_ORDER"].ToString() != "") { model.N_PRINT_ORDER = decimal.Parse(row["N_PRINT_ORDER"].ToString()); } if (row["N_SPEC_MIN"] != null && row["N_SPEC_MIN"].ToString() != "") { model.N_SPEC_MIN = decimal.Parse(row["N_SPEC_MIN"].ToString()); } if (row["C_SPEC_INTERVAL"] != null) { model.C_SPEC_INTERVAL = row["C_SPEC_INTERVAL"].ToString(); } if (row["N_SPEC_MAX"] != null && row["N_SPEC_MAX"].ToString() != "") { model.N_SPEC_MAX = decimal.Parse(row["N_SPEC_MAX"].ToString()); } if (row["C_FORMULA"] != null) { model.C_FORMULA = row["C_FORMULA"].ToString(); } if (row["C_UNIT"] != null) { model.C_UNIT = row["C_UNIT"].ToString(); } if (row["N_DIGIT"] != null && row["N_DIGIT"].ToString() != "") { model.N_DIGIT = decimal.Parse(row["N_DIGIT"].ToString()); } if (row["C_QUANTITATIVE"] != null) { model.C_QUANTITATIVE = row["C_QUANTITATIVE"].ToString(); } if (row["C_TEST_TEM"] != null) { model.C_TEST_TEM = row["C_TEST_TEM"].ToString(); } if (row["C_TEST_CONDITION"] != null) { model.C_TEST_CONDITION = row["C_TEST_CONDITION"].ToString(); } if (row["N_STATUS"] != null && row["N_STATUS"].ToString() != "") { model.N_STATUS = decimal.Parse(row["N_STATUS"].ToString()); } if (row["C_REMARK"] != null) { model.C_REMARK = row["C_REMARK"].ToString(); } if (row["C_EMP_ID"] != null) { model.C_EMP_ID = row["C_EMP_ID"].ToString(); } if (row["D_MOD_DT"] != null && row["D_MOD_DT"].ToString() != "") { model.D_MOD_DT = DateTime.Parse(row["D_MOD_DT"].ToString()); } } return(model); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Mod_TQB_DESIGN_ITEM model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update TQB_DESIGN_ITEM set "); strSql.Append("C_DESIGN_ID=:C_DESIGN_ID,"); strSql.Append("C_CHARACTER_ID=:C_CHARACTER_ID,"); strSql.Append("C_TARGET_MIN=:C_TARGET_MIN,"); strSql.Append("C_TARGET_INTERVAL=:C_TARGET_INTERVAL,"); strSql.Append("C_TARGET_MAX=:C_TARGET_MAX,"); strSql.Append("C_PREWARNING_VALUE=:C_PREWARNING_VALUE,"); strSql.Append("C_TYPE=:C_TYPE,"); strSql.Append("C_IS_DECIDE=:C_IS_DECIDE,"); strSql.Append("C_IS_PRINT=:C_IS_PRINT,"); strSql.Append("N_PRINT_ORDER=:N_PRINT_ORDER,"); strSql.Append("N_SPEC_MIN=:N_SPEC_MIN,"); strSql.Append("C_SPEC_INTERVAL=:C_SPEC_INTERVAL,"); strSql.Append("N_SPEC_MAX=:N_SPEC_MAX,"); strSql.Append("C_FORMULA=:C_FORMULA,"); strSql.Append("C_UNIT=:C_UNIT,"); strSql.Append("N_DIGIT=:N_DIGIT,"); strSql.Append("C_QUANTITATIVE=:C_QUANTITATIVE,"); strSql.Append("C_TEST_TEM=:C_TEST_TEM,"); strSql.Append("C_TEST_CONDITION=:C_TEST_CONDITION,"); strSql.Append("N_STATUS=:N_STATUS,"); strSql.Append("C_REMARK=:C_REMARK,"); strSql.Append("C_EMP_ID=:C_EMP_ID,"); strSql.Append("D_MOD_DT=:D_MOD_DT"); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_DESIGN_ID", OracleDbType.Varchar2, 100), new OracleParameter(":C_CHARACTER_ID", OracleDbType.Varchar2, 100), new OracleParameter(":C_TARGET_MIN", OracleDbType.Varchar2, 100), new OracleParameter(":C_TARGET_INTERVAL", OracleDbType.Varchar2, 100), new OracleParameter(":C_TARGET_MAX", OracleDbType.Varchar2, 100), new OracleParameter(":C_PREWARNING_VALUE", OracleDbType.Varchar2, 100), new OracleParameter(":C_TYPE", OracleDbType.Varchar2, 100), new OracleParameter(":C_IS_DECIDE", OracleDbType.Varchar2, 100), new OracleParameter(":C_IS_PRINT", OracleDbType.Varchar2, 100), new OracleParameter(":N_PRINT_ORDER", OracleDbType.Decimal, 5), new OracleParameter(":N_SPEC_MIN", OracleDbType.Decimal, 15), new OracleParameter(":C_SPEC_INTERVAL", OracleDbType.Varchar2, 100), new OracleParameter(":N_SPEC_MAX", OracleDbType.Decimal, 15), new OracleParameter(":C_FORMULA", OracleDbType.Varchar2, 100), new OracleParameter(":C_UNIT", OracleDbType.Varchar2, 100), new OracleParameter(":N_DIGIT", OracleDbType.Decimal, 1), new OracleParameter(":C_QUANTITATIVE", OracleDbType.Varchar2, 100), new OracleParameter(":C_TEST_TEM", OracleDbType.Varchar2, 100), new OracleParameter(":C_TEST_CONDITION", OracleDbType.Varchar2, 100), new OracleParameter(":N_STATUS", OracleDbType.Decimal, 1), new OracleParameter(":C_REMARK", OracleDbType.Varchar2, 500), new OracleParameter(":C_EMP_ID", OracleDbType.Varchar2, 100), new OracleParameter(":D_MOD_DT", OracleDbType.Date), new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = model.C_DESIGN_ID; parameters[1].Value = model.C_CHARACTER_ID; parameters[2].Value = model.C_TARGET_MIN; parameters[3].Value = model.C_TARGET_INTERVAL; parameters[4].Value = model.C_TARGET_MAX; parameters[5].Value = model.C_PREWARNING_VALUE; parameters[6].Value = model.C_TYPE; parameters[7].Value = model.C_IS_DECIDE; parameters[8].Value = model.C_IS_PRINT; parameters[9].Value = model.N_PRINT_ORDER; parameters[10].Value = model.N_SPEC_MIN; parameters[11].Value = model.C_SPEC_INTERVAL; parameters[12].Value = model.N_SPEC_MAX; parameters[13].Value = model.C_FORMULA; parameters[14].Value = model.C_UNIT; parameters[15].Value = model.N_DIGIT; parameters[16].Value = model.C_QUANTITATIVE; parameters[17].Value = model.C_TEST_TEM; parameters[18].Value = model.C_TEST_CONDITION; parameters[19].Value = model.N_STATUS; parameters[20].Value = model.C_REMARK; parameters[21].Value = model.C_EMP_ID; parameters[22].Value = model.D_MOD_DT; parameters[23].Value = model.C_ID; int rows = TransactionHelper.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Mod_TQB_DESIGN_ITEM model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Mod_TQB_DESIGN_ITEM model) { return(dal.Add(model)); }