コード例 #1
0
        public int Add(R_MRB newMrb, OleExec DB)
        {
            string strSql = $@"insert into r_mrb( id,sn,workorderno,next_station,skuno,from_storage,to_storage,rework_wo,create_emp,create_time,mrb_flag,sap_flag,edit_emp,edit_time)";

            strSql = strSql + $@"values(:id,:sn,:workorderno,:next_station,:skuno,:from_storage,:to_storage,:rework_wo,:create_emp,:create_time,:mrb_flag,:sap_flag,:edit_emp,:edit_time)";
            OleDbParameter[] paramet = new OleDbParameter[]
            {
                new OleDbParameter(":id", newMrb.ID),
                new OleDbParameter(":sn", newMrb.SN),
                new OleDbParameter(":workorderno", newMrb.WORKORDERNO),
                new OleDbParameter(":next_station", newMrb.NEXT_STATION),
                new OleDbParameter(":skuno", newMrb.SKUNO),
                new OleDbParameter(":from_storage", newMrb.FROM_STORAGE),
                new OleDbParameter(":to_storage", newMrb.TO_STORAGE),
                new OleDbParameter(":rework_wo", newMrb.REWORK_WO),
                new OleDbParameter(":create_emp", newMrb.CREATE_EMP),
                new OleDbParameter(":create_time", newMrb.CREATE_TIME),
                new OleDbParameter(":mrb_flag", newMrb.MRB_FLAG),
                new OleDbParameter(":sap_flag", newMrb.SAP_FLAG),
                new OleDbParameter(":edit_emp", newMrb.EDIT_EMP),
                new OleDbParameter(":edit_time", newMrb.EDIT_TIME)
            };
            int result = DB.ExecuteNonQuery(strSql, CommandType.Text, paramet);

            return(result);
        }
コード例 #2
0
        public R_MRB GetDataObject()
        {
            R_MRB DataObject = new R_MRB();

            DataObject.ID           = this.ID;
            DataObject.SN           = this.SN;
            DataObject.WORKORDERNO  = this.WORKORDERNO;
            DataObject.NEXT_STATION = this.NEXT_STATION;
            DataObject.SKUNO        = this.SKUNO;
            DataObject.FROM_STORAGE = this.FROM_STORAGE;
            DataObject.TO_STORAGE   = this.TO_STORAGE;
            DataObject.REWORK_WO    = this.REWORK_WO;
            DataObject.CREATE_EMP   = this.CREATE_EMP;
            DataObject.CREATE_TIME  = this.CREATE_TIME;
            DataObject.MRB_FLAG     = this.MRB_FLAG;
            DataObject.SAP_FLAG     = this.SAP_FLAG;
            DataObject.EDIT_EMP     = this.EDIT_EMP;
            DataObject.EDIT_TIME    = this.EDIT_TIME;
            return(DataObject);
        }