Ejemplo n.º 1
0
        private DataTable GetPrintLoadingOrder(string doNo, string userid, string tableName)
        {
            List <DeliveryOrder> lstLoadingOrd = null;
            DeliveryOrder        loadingOrd;

            try
            {
                ProcParam param = new ProcParam(3)
                {
                    ProcedureName = "DO_PACK.REP_DO_R1"
                };

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strDO_NO", doNo);
                param.AddParamInput(2, "strUSER_ID", userid);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                ////this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.OraReader.HasRows)
                {
                    lstLoadingOrd = new List <DeliveryOrder>();

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        loadingOrd = new DeliveryOrder();

                        loadingOrd.DO_NO   = OraDataReader.Instance.GetString("DO_NO");
                        loadingOrd.DO_DATE = OraDataReader.Instance.GetDateTime("DO_DATE");

                        loadingOrd.DELIVERY_DATE = OraDataReader.Instance.GetDateTime("DELIVERY_DATE");

                        loadingOrd.PROD_TYPE = OraDataReader.Instance.GetString("PROD_TYPE");
                        loadingOrd.REF_NO    = OraDataReader.Instance.GetString("REF_NO");
                        loadingOrd.TO_DEST   = OraDataReader.Instance.GetString("TO_DEST");
                        loadingOrd.REMARK    = OraDataReader.Instance.GetString("REMARK");

                        //loadingOrd.BARCODE = UtilityBLL.QRCode_Encode(loadingOrd.DO_NO);

                        lstLoadingOrd.Add(loadingOrd);
                    }
                }

                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstLoadingOrd = null;
                throw ex;
            }

            return(UtilityBLL.ListToDataTable(lstLoadingOrd, tableName));
        }
Ejemplo n.º 2
0
        private DataTable GetPrintLoadingOrder(int seqNo, string tableName)
        {
            List <LoadingOrder> lstLoadingOrd = null;
            LoadingOrder        loadingOrd;

            try
            {
                ProcParam param = new ProcParam(2)
                {
                    ProcedureName = "LOADING_PACK.RPT_DELIVERY_HDR"
                };

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strSEQ_NO", seqNo);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                //this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.OraReader.HasRows)
                {
                    lstLoadingOrd = new List <LoadingOrder>();

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        loadingOrd = new LoadingOrder();

                        loadingOrd.WH_ID         = OraDataReader.Instance.GetString("WH");
                        loadingOrd.LOADING_NO    = OraDataReader.Instance.GetString("LOADING_NO");
                        loadingOrd.DELIVERY_DATE = OraDataReader.Instance.GetDateTime("DELIVERY_DATE");
                        loadingOrd.TRUCK_NO      = OraDataReader.Instance.GetString("TRUCK_NO");
                        loadingOrd.REMARK        = OraDataReader.Instance.GetString("REMARK");
                        //loadingOrd.BARCODE = UtilityBLL.QRCode_Encode(loadingOrd.LOADING_NO);

                        lstLoadingOrd.Add(loadingOrd);
                    }
                }

                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstLoadingOrd = null;
                throw ex;
            }

            return(UtilityBLL.ListToDataTable(lstLoadingOrd, tableName));
        }
Ejemplo n.º 3
0
        public DataTable GetProductionProcess(string prodSEQ)
        {
            List <ProdProcess> lstProdProcess = null;

            try
            {
                ProcParam param = new ProcParam(2)
                {
                    ProcedureName = "MASTER_PACK.GET_M_PROD_PROCESS"
                };

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strPROD_SEQ_NO", prodSEQ);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                //this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.HasRows)
                {
                    lstProdProcess = new List <ProdProcess>();
                    ProdProcess prodProcess;

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        prodProcess = new ProdProcess();

                        prodProcess.PROD_SEQ_NO  = OraDataReader.Instance.GetString("PROD_SEQ_NO");
                        prodProcess.PROCESS_NO   = OraDataReader.Instance.GetString("PROCESS_NO");
                        prodProcess.PROCESS_NAME = OraDataReader.Instance.GetString("PROCESS_NAME");
                        prodProcess.STEP_NO      = OraDataReader.Instance.GetInteger("STEP_NO");
                        prodProcess.REC_STAT     = (OraDataReader.Instance.GetString("REC_STAT").ToUpper() == "Y");
                        prodProcess.FLAG         = OraDataReader.Instance.GetInteger("FLAG");

                        lstProdProcess.Add(prodProcess);
                    }
                }

                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstProdProcess = null;
            }

            return(UtilityBLL.ListToDataTable(lstProdProcess, "M_PROD_PROCESS"));
        }
Ejemplo n.º 4
0
        public DataTable GetProgramType(string procTypeID)
        {
            List <ProgramType> lstProcType = null;
            ProgramType        procType;

            try
            {
                ProcParam param = new ProcParam(2);

                param.ProcedureName = "ADMINISTRATOR_PACK.GET_PROGRAM_TYPE_LIST";
                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strPROG_TYPE", procTypeID);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                // //this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.HasRows)
                {
                    lstProcType = new List <ProgramType>();

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        //Console.WriteLine(reader.GetInt32(0) + ", " + myReader.GetString(1));
                        procType = new ProgramType();

                        procType.PROG_TYPE      = OraDataReader.Instance.GetString("PROG_TYPE");
                        procType.PROG_TYPE_NAME = OraDataReader.Instance.GetString("PROG_TYPE_NAME");
                        procType.REC_STAT       = (OraDataReader.Instance.GetString("REC_STAT").ToUpper() == "Y");
                        procType.ORDER_BY       = OraDataReader.Instance.GetInteger("ORDER_BY");
                        procType.ICON           = OraDataReader.Instance.GetString("ICON");

                        lstProcType.Add(procType);
                    }
                }

                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstProcType = null;
            }

            //return lstProcType;
            return(UtilityBLL.ListToDataTable(lstProcType, "M_PROGRAM_TYPE"));
        }
Ejemplo n.º 5
0
        public DataTable GetRoleProgramByRole(string roleID)
        {
            List <RoleProgram> lstRoleProg = null;

            try
            {
                ProcParam param = new ProcParam(2);

                param.ProcedureName = "ADMINISTRATOR_PACK.GET_ROLE_PROGRAM_LIST";

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strROLE_ID", roleID);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                ////this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.HasRows)
                {
                    lstRoleProg = new List <RoleProgram>();
                    RoleProgram roleProg;

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        roleProg = new RoleProgram();

                        roleProg.ROLE_ID   = OraDataReader.Instance.GetString("ROLE_ID");
                        roleProg.PROG_ID   = OraDataReader.Instance.GetString("PROG_ID");
                        roleProg.PROG_NAME = OraDataReader.Instance.GetString("PROG_NAME");
                        roleProg.REC_STAT  = (OraDataReader.Instance.GetString("REC_STAT").ToUpper() == "Y");
                        roleProg.FLAG      = OraDataReader.Instance.GetInteger("FLAG");

                        lstRoleProg.Add(roleProg);
                    }
                    // always call Close when done reading.
                    OraDataReader.Instance.Close();
                }
            }
            catch (Exception ex)
            {
                lstRoleProg = null;
            }

            return(UtilityBLL.ListToDataTable(lstRoleProg, "M_ROLE_PROGRAM"));
        }
Ejemplo n.º 6
0
        private DataTable GetPrintMachineOrder(int seqNo, string tableName)
        {
            List <Machine> lstMachine = null;
            Machine        mc;

            try
            {
                ProcParam param = new ProcParam(2);

                param.ProcedureName = "MASTER_PACK.RPT_M_MACHINE_LIST";

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strSEQ_NO", seqNo);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                //this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.OraReader.HasRows)
                {
                    lstMachine = new List <Machine>();

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        mc = new Machine();

                        mc.MC_NO        = OraDataReader.Instance.GetString("MC_NO");
                        mc.MACHINE_NAME = OraDataReader.Instance.GetString("MACHINE_NAME");
                        //mc.BARCODE = UtilityBLL.QRCode_Encode(mc.MC_NO);
                        lstMachine.Add(mc);
                    }
                }

                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstMachine = null;
                throw ex;
            }

            return(UtilityBLL.ListToDataTable(lstMachine, tableName));
        }
Ejemplo n.º 7
0
        public DataTable GetUserRoleByUserID(string userID)
        {
            List <UserRole> lstUserRole = null;

            try
            {
                ProcParam param = new ProcParam(2);

                param.ProcedureName = "ADMINISTRATOR_PACK.GET_USER_ROLE_LIST";

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strUSER_ID", userID);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                ////this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.HasRows)
                {
                    lstUserRole = new List <UserRole>();
                    UserRole userRole;
                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        userRole = new UserRole();

                        userRole.ROLE_ID   = OraDataReader.Instance.GetString("ROLE_ID");
                        userRole.ROLE_NAME = OraDataReader.Instance.GetString("ROLE_NAME");
                        userRole.REC_STAT  = (OraDataReader.Instance.GetString("REC_STAT").ToUpper() == "Y");
                        userRole.FLAG      = OraDataReader.Instance.GetInteger("FLAG");

                        lstUserRole.Add(userRole);
                    }
                }
                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstUserRole = null;
            }

            return(UtilityBLL.ListToDataTable(lstUserRole, "M_ROLE_PROGRAM"));
        }
Ejemplo n.º 8
0
        private DataTable GetPrintMaterialCard(int seqNo, string tableName)
        {
            List <MaterialCard> lstMCard = null;
            MaterialCard        mCard;

            try
            {
                ProcParam param = new ProcParam(2)
                {
                    ProcedureName = "MTL_IN_PACK.RPT_MATERIAL_CARD_LABEL"
                };

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strSEQ_NO", seqNo);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                //this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.OraReader.HasRows)
                {
                    lstMCard = new List <MaterialCard>();

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        mCard = new MaterialCard();

                        mCard.ARRIVAL_NO    = OraDataReader.Instance.GetString("ARRIVAL_NO");
                        mCard.SERIAL_NO     = OraDataReader.Instance.GetString("SERIAL_NO");
                        mCard.MTL_SEQ_NO    = OraDataReader.Instance.GetString("MTL_SEQ_NO");
                        mCard.MTL_CODE      = OraDataReader.Instance.GetString("MTL_CODE");
                        mCard.MTL_NAME      = OraDataReader.Instance.GetString("MTL_NAME");
                        mCard.MTL_GRADE     = OraDataReader.Instance.GetString("MTL_GRADE");
                        mCard.MTL_COLOR     = OraDataReader.Instance.GetString("MTL_COLOR");
                        mCard.LOCATION_NAME = OraDataReader.Instance.GetString("LOCATION_NAME");
                        mCard.PARTY_NAME    = OraDataReader.Instance.GetString("PARTY_NAME");

                        if (!OraDataReader.Instance.IsDBNull("LOT_DATE"))
                        {
                            mCard.LOT_DATE = OraDataReader.Instance.GetDateTime("LOT_DATE");
                        }

                        mCard.QTY         = OraDataReader.Instance.GetDecimal("QTY");
                        mCard.UNIT_ID     = OraDataReader.Instance.GetString("UNIT_ID");
                        mCard.NO_OF_LABEL = OraDataReader.Instance.GetString("NO_OF_LABEL");
                        mCard.MIN_QTY     = OraDataReader.Instance.GetDecimal("MIN_QTY");
                        mCard.MAX_QTY     = OraDataReader.Instance.GetDecimal("MAX_QTY");


                        //prdCard.BARCODE = UtilityBLL.QRCode_Encode(prdCard.SERIAL_NO);

                        //prdCard.BARCODE = OraDataReader.Instance.GetBitmap("BARCODE");
                        //prdCard.BARCODE.Save(string.Format("C:\\Temp\\PicTemp2D\\{0}.BMP", prdCard.SERIAL_NO));
                        mCard.MTL_IMAGE = OraDataReader.Instance.GetBitmap("MTL_IMAGE");

                        lstMCard.Add(mCard);
                    }
                }

                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstMCard = null;
                throw ex;
            }

            //return this.ListToDataTable(lstPrdCard, tableName);
            //DataTable dt  = UtilityBLL.ListToDataTable(lstPrdCard, tableName);
            return(UtilityBLL.ListToDataTable(lstMCard, tableName));
        }
Ejemplo n.º 9
0
        public DataTable PrintTO(int seqNo, string tableName)
        {
            List <TransferOrderRpt> lstTO = null;
            TransferOrderRpt        TOrpt;

            try
            {
                ProcParam param = new ProcParam(2)
                {
                    ProcedureName = "TO_PACK.RPT_TRANSFER_ORDER"
                };

                param.AddParamRefCursor(0, "io_cursor");
                param.AddParamInput(1, "strSEQ_NO", seqNo);

                OraDataReader.Instance.OraReader = GlobalDB.Instance.DataAc.ExecuteDataReader(param);

                //this.executionTime = GlobalDB.Instance.DataAc.ExecuteTime;

                if (OraDataReader.Instance.OraReader.HasRows)
                {
                    lstTO = new List <TransferOrderRpt>();

                    OraDataReader.Instance.OraReader.FetchSize = OraDataReader.Instance.OraReader.RowSize * 1000;

                    while (OraDataReader.Instance.OraReader.Read())
                    {
                        TOrpt = new TransferOrderRpt();

                        TOrpt.TO_NO         = OraDataReader.Instance.GetString("TO_NO");
                        TOrpt.PRODUCT_TYPE  = OraDataReader.Instance.GetString("PRODUCT_TYPE");
                        TOrpt.TO_DATE       = OraDataReader.Instance.GetDateTime("TO_DATE");
                        TOrpt.REF_NO        = OraDataReader.Instance.GetString("REF_NO");
                        TOrpt.DESTINATION   = OraDataReader.Instance.GetString("DESTINATION");
                        TOrpt.DELIVERY_DATE = OraDataReader.Instance.GetDateTime("DELIVERY_DATE");
                        TOrpt.HDR_REMARK    = OraDataReader.Instance.GetString("HDR_REMARK");
                        TOrpt.PRODUCT_NO    = OraDataReader.Instance.GetString("PRODUCT_NO");
                        TOrpt.PRODUCT_NAME  = OraDataReader.Instance.GetString("PRODUCT_NAME");
                        TOrpt.QTY           = OraDataReader.Instance.GetInteger("QTY");
                        TOrpt.UNIT_ID       = OraDataReader.Instance.GetString("UNIT_ID");
                        TOrpt.QTY_PER_BOX   = OraDataReader.Instance.GetInteger("QTY_PER_BOX");
                        TOrpt.NO_OF_BOX     = OraDataReader.Instance.GetInteger("NO_OF_BOX");

                        //TOrpt.BARCODE = UtilityBLL.QRCode_Encode(TOrpt.TO_NO);

                        TOrpt.DTL_REMARK = OraDataReader.Instance.GetString("DTL_REMARK");

                        lstTO.Add(TOrpt);
                    }
                }
                // always call Close when done reading.
                OraDataReader.Instance.Close();
            }
            catch (Exception ex)
            {
                lstTO = null;
                throw ex;
            }

            return(UtilityBLL.ListToDataTable(lstTO, tableName));
        }