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); } }