private bool SelectAndInsertExclusive(string mitsumoriNo) { //DeleteExclusive(); //排他Tableに該当番号が存在するとError //[D_Exclusive] Exclusive_BL ebl = new Exclusive_BL(); D_Exclusive_Entity dee = new D_Exclusive_Entity { DataKBN = (int)Exclusive_BL.DataKbn.Mitsumori, Number = mitsumoriNo, Program = this.InProgramID, Operator = this.InOperatorCD, PC = this.InPcID }; DataTable dt = ebl.D_Exclusive_Select(dee); if (dt.Rows.Count > 0) { bbl.ShowMessage("S004", dt.Rows[0]["Program"].ToString(), dt.Rows[0]["Operator"].ToString()); //detailControls[(int)EIndex.MitsumoriNO].Focus(); return(false); } else { bool ret = ebl.D_Exclusive_Insert(dee); mOldMitsumoriNo = mitsumoriNo; return(ret); } }
private bool SelectAndInsertExclusive(string InstructionNO) { DeleteExclusive(); //排他Tableに該当番号が存在するとError //[D_Exclusive] Exclusive_BL ebl = new Exclusive_BL(); D_Exclusive_Entity dee = new D_Exclusive_Entity { DataKBN = (int)Exclusive_BL.DataKbn.SyukkaShiji, Number = InstructionNO, Program = this.InProgramID, Operator = this.InOperatorCD, PC = this.InPcID }; DataTable dt = ebl.D_Exclusive_Select(dee); if (dt.Rows.Count > 0) { bbl.ShowMessage("S004", dt.Rows[0]["Program"].ToString(), dt.Rows[0]["Operator"].ToString()); return(false); } else { bool ret = ebl.D_Exclusive_Insert(dee); mOldInstructionNO = InstructionNO; return(ret); } }
/// <summary> /// 排他処理データを削除する /// </summary> private void DeleteExclusive(DataTable dtForUpdate = null) { if (mOldInstructionNO == "" && dtForUpdate == null) { return; } Exclusive_BL ebl = new Exclusive_BL(); if (dtForUpdate != null) { foreach (DataRow dr in dtForUpdate.Rows) { D_Exclusive_Entity de = new D_Exclusive_Entity(); de.DataKBN = (int)Exclusive_BL.DataKbn.SyukkaShiji; de.Number = dr["no"].ToString(); ebl.D_Exclusive_Delete(de); } return; } D_Exclusive_Entity dee = new D_Exclusive_Entity { DataKBN = (int)Exclusive_BL.DataKbn.Mitsumori, Number = mOldInstructionNO, }; bool ret = ebl.D_Exclusive_Delete(dee); mOldInstructionNO = ""; }
/// <summary> /// 排他処理データを削除する /// </summary> private void DeleteExclusive(DataTable dtForUpdate = null) { if (mOldBillingNo == "" && dtForUpdate == null) { return; } Exclusive_BL ebl = new Exclusive_BL(); if (dtForUpdate != null) { foreach (DataRow dr in dtForUpdate.Rows) { D_Exclusive_Entity de = new D_Exclusive_Entity(); de.DataKBN = (int)Exclusive_BL.DataKbn.Seikyu; de.Number = dr["no"].ToString(); ebl.D_Exclusive_Delete(de); } return; } D_Exclusive_Entity dee = new D_Exclusive_Entity { DataKBN = (int)Exclusive_BL.DataKbn.Seikyu, Number = mOldBillingNo, }; bool ret = ebl.D_Exclusive_Delete(dee); mOldBillingNo = ""; }
/// <summary> /// 排他処理データを削除する /// </summary> private void DeleteExclusive(DataTable dtForUpdate = null) { if (dtForUpdate == null) { return; } Exclusive_BL ebl = new Exclusive_BL(); if (dtForUpdate != null) { foreach (DataRow dr in dtForUpdate.Rows) { D_Exclusive_Entity de = new D_Exclusive_Entity(); de.DataKBN = (int)Exclusive_BL.DataKbn.Shiire; de.Number = dr["no"].ToString(); ebl.D_Exclusive_Delete(de); } return; } }