Beispiel #1
0
        public R_WO_HEADER GetDetailByWo(OleExec db, string wo)
        {
            DataTable   dt        = null;
            R_WO_HEADER wo_header = null;

            if (DBType == DB_TYPE_ENUM.Oracle)
            {
                string sql = $@"select * from {TableName} where aufnr='{wo}' ";
                try
                {
                    dt = db.ExecSelect(sql).Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                        Row_R_WO_HEADER row_header = (Row_R_WO_HEADER)NewRow();
                        row_header.loadData(dt.Rows[0]);
                        wo_header = row_header.GetDataObject();
                    }
                    return(wo_header);
                }
                catch (Exception ex)
                {
                    throw new Exception(MESReturnMessage.GetMESReturnMessage("MES00000037", new string[] { ex.Message }));
                }
            }
            else
            {
                throw new Exception(MESReturnMessage.GetMESReturnMessage("MES00000019", new string[] { this.DBType.ToString() }));
            }
        }
Beispiel #2
0
        public R_WO_HEADER GetDataObject()
        {
            R_WO_HEADER DataObject = new R_WO_HEADER();

            DataObject.ID         = this.ID;
            DataObject.AUFNR      = this.AUFNR;
            DataObject.WERKS      = this.WERKS;
            DataObject.AUART      = this.AUART;
            DataObject.MATNR      = this.MATNR;
            DataObject.REVLV      = this.REVLV;
            DataObject.KDAUF      = this.KDAUF;
            DataObject.GSTRS      = this.GSTRS;
            DataObject.GAMNG      = this.GAMNG;
            DataObject.KDMAT      = this.KDMAT;
            DataObject.AEDAT      = this.AEDAT;
            DataObject.AENAM      = this.AENAM;
            DataObject.MATKL      = this.MATKL;
            DataObject.MAKTX      = this.MAKTX;
            DataObject.ERDAT      = this.ERDAT;
            DataObject.GSUPS      = this.GSUPS;
            DataObject.ERFZEIT    = this.ERFZEIT;
            DataObject.GLTRS      = this.GLTRS;
            DataObject.GLUPS      = this.GLUPS;
            DataObject.LGORT      = this.LGORT;
            DataObject.ABLAD      = this.ABLAD;
            DataObject.ROHS_VALUE = this.ROHS_VALUE;
            DataObject.FTRMI      = this.FTRMI;
            DataObject.MVGR3      = this.MVGR3;
            DataObject.WEMNG      = this.WEMNG;
            DataObject.BISMT      = this.BISMT;
            DataObject.CHARG      = this.CHARG;
            DataObject.SAENR      = this.SAENR;
            DataObject.AETXT      = this.AETXT;
            DataObject.GLTRP      = this.GLTRP;
            return(DataObject);
        }