Ejemplo n.º 1
0
        public void SetMaker(MovieMaker myMaker)
        {
            if (myMaker != null)
            {
                Maker = myMaker;
            }

            if (Maker != null)
            {
                Kind     = Maker.Kind;
                StrMaker = Maker.GetNameLabel();
            }

            if (ProductNumber == null || ProductNumber.Length <= 0)
            {
                Regex regex = new Regex(Maker.MatchProductNumber);
                ProductNumber = regex.Match(CopyText).Groups[0].Value;
            }
        }
Ejemplo n.º 2
0
        public static List <MovieMaker> GetAllData()
        {
            MySqlDbConnection dbcon = new MySqlDbConnection();

            List <MovieMaker> listMMakers = new List <MovieMaker>();

            string queryString = "SELECT ID, NAME, LABEL, KIND, MATCH_STR, MATCH_PRODUCT_NUMBER, REGISTERED_BY, CREATED_AT, UPDATED_AT FROM maker ORDER BY NAME DESC ";

            dbcon.openConnection();

            MySqlCommand command = new MySqlCommand(queryString, dbcon.getMySqlConnection());

            MySqlDataReader reader = command.ExecuteReader();

            do
            {
                while (reader.Read())
                {
                    MovieMaker data = new MovieMaker();

                    int colNo = 0;
                    data.Id                 = MysqlExportCommon.GetDbInt(reader, colNo++);
                    data.Name               = MysqlExportCommon.GetDbString(reader, colNo++);
                    data.Label              = MysqlExportCommon.GetDbString(reader, colNo++);
                    data.Kind               = MysqlExportCommon.GetDbInt(reader, colNo++);
                    data.MatchStr           = MysqlExportCommon.GetDbString(reader, colNo++);
                    data.MatchProductNumber = MysqlExportCommon.GetDbString(reader, colNo++);
                    data.RegisterdBy        = MysqlExportCommon.GetDbString(reader, colNo++);
                    data.CreateDate         = MysqlExportCommon.GetDbDateTime(reader, colNo++);
                    data.UpdateDate         = MysqlExportCommon.GetDbDateTime(reader, colNo++);

                    listMMakers.Add(data);
                }
            } while (reader.NextResult());

            reader.Close();

            dbcon.closeConnection();

            return(listMMakers);
        }