/// <summary> /// 复检确认 /// </summary> /// <param name="dr">需要确认的数据</param> /// <param name="TickNo">钩号</param> /// <returns></returns> public string Recheck_QR(DataTable dt_main, int[] rownumber, string[] str_tick_no, string strQRZT, int Type) { string result = "1"; try { TransactionHelper.BeginTransaction(); string userID = RV.UI.UserInfo.UserID; DateTime dTime = RV.UI.ServerTime.timeNow(); Dal_TQC_RECHECK dalRecheck = new Dal_TQC_RECHECK(); Dal_TQC_PHYSICS_RESULT_MAIN dalPhysicsResultMain = new Dal_TQC_PHYSICS_RESULT_MAIN(); Dal_TQB_PHYSICS_GROUP dalTqbPhysicsGroup = new Dal_TQB_PHYSICS_GROUP(); Dal_TQC_RESULT_MAIN_ZJB dalResultMainZJB = new Dal_TQC_RESULT_MAIN_ZJB(); for (int i = 0; i < rownumber.Length; i++) { Mod_TQC_RECHECK mod = dalRecheck.GetModel(str_tick_no[i]); mod.N_IS_QR = Type; mod.C_ZZ_USER_ID = userID; mod.D_ZZ_MOD = dTime; mod.C_ZZJG = strQRZT; if (!dalRecheck.Update_Trans(mod)) { TransactionHelper.RollBack(); return("0"); } } TransactionHelper.Commit(); } catch (Exception ex) { TransactionHelper.RollBack(); return("0"); } return(result); }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQC_RECHECK GetModel(string C_ID) { return(dal.GetModel(C_ID)); }
/// <summary> /// 复检确认 /// </summary> /// <param name="dr">需要确认的数据</param> /// <param name="TickNo">钩号</param> /// <returns></returns> public string Recheck_SL(DataTable dt_main, int[] rownumber, string[] str_tick_no, string strQRZT, int Type) { string result = "1"; try { TransactionHelper.BeginTransaction(); string userID = RV.UI.UserInfo.UserID; DateTime dTime = RV.UI.ServerTime.timeNow(); Dal_TQC_RECHECK dalRecheck = new Dal_TQC_RECHECK(); Dal_TQC_PHYSICS_RESULT_MAIN dalPhysicsResultMain = new Dal_TQC_PHYSICS_RESULT_MAIN(); Dal_TQB_PHYSICS_GROUP dalTqbPhysicsGroup = new Dal_TQB_PHYSICS_GROUP(); Dal_TQC_RESULT_MAIN_ZJB dalResultMainZJB = new Dal_TQC_RESULT_MAIN_ZJB(); for (int i = 0; i < rownumber.Length; i++) { Mod_TQC_RECHECK mod = dalRecheck.GetModel(dt_main.Rows[rownumber[i]]["C_ID"].ToString()); mod.N_IS_QR = Type; mod.C_TICK_NO = str_tick_no[i]; mod.C_QR_USER_ID = userID; mod.D_QR_MOD = dTime; if (!dalRecheck.Update_Trans(mod)) { TransactionHelper.RollBack(); return("0"); } else { string str_PHYSICS_GROUP_ID = dalTqbPhysicsGroup.Get_ID(dt_main.Rows[rownumber[i]]["C_PHYSICS_CODE"].ToString()); if (str_PHYSICS_GROUP_ID == "0") { TransactionHelper.RollBack(); return("0"); } Mod_TQC_RESULT_MAIN_ZJB mod_zjb = new Mod_TQC_RESULT_MAIN_ZJB(); mod_zjb.C_BATCH_NO = dt_main.Rows[rownumber[i]]["C_BATCH_NO"].ToString(); mod_zjb.C_TICK_NO = str_tick_no[i]; mod_zjb.C_STL_GRD = dt_main.Rows[rownumber[i]]["C_STL_GRD"].ToString(); mod_zjb.C_SPEC = dt_main.Rows[rownumber[i]]["C_SPEC"].ToString(); mod_zjb.C_EMP_ID = dt_main.Rows[rownumber[i]]["C_EMP_ID"].ToString(); mod_zjb.D_MOD_DT = Convert.ToDateTime(dt_main.Rows[rownumber[i]]["D_MOD_DT"].ToString()); mod_zjb.C_EMP_ID_ZY = userID; mod_zjb.D_MOD_DT_ZY = Convert.ToDateTime(dTime); mod_zjb.C_EMP_ID_JS = userID; mod_zjb.D_MOD_DT_JS = Convert.ToDateTime(dTime); mod_zjb.C_PHYSICS_GROUP_ID = str_PHYSICS_GROUP_ID; mod_zjb.C_CHECK_STATE = "1"; mod_zjb.N_RECHECK = mod.N_RECHECK; mod_zjb.C_ITEM_NAME = mod.C_ITEM_NAME; mod_zjb.C_QRZT = strQRZT; mod_zjb.C_DISPOSAL = mod.C_DISPOSAL; if (!dalResultMainZJB.Add_Trans(mod_zjb)) { TransactionHelper.RollBack(); return("0"); } } } TransactionHelper.Commit(); } catch (Exception ex) { TransactionHelper.RollBack(); return("0"); } return(result); }