Example #1
0
        public ConfigPriceMe()
        {
            BLL.DbBase            db = new DbBase();
            System.Data.DataTable dt = db.ExecuteDataSet("SELECT DISTINCT category FROM dbo.Price").Tables[0];
            var model = new ConfigPriceMe(0);

            foreach (System.Data.DataRow item in dt.Rows)
            {
                if (!Exist(item["category"].ToString()))
                {
                    model.id         = MongoDB.Oid.NewOid().ToString();
                    model.name       = item["category"].ToString();
                    model.Price_Plus = 1;
                    Insert(model);
                    System.Threading.Thread.Sleep(1000);
                }
            }
        }