Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FuctionPack F = new FuctionPack();

            //string[] in_params = { "deviceId", "channelId" };
            //string[] in_values = { "1", "1" };
            F.table_name = "cTicketWhiteList";
            //F.in_params = in_params;
            //F.in_value = in_values;
            //F.extra_script = "order by in_cnt desc";
            DataTable result = new DataTable();

            F.GetDBData(ref result);
        }
Ejemplo n.º 2
0
        private void GetAllProducts()
        {
            DateTime    indbT = DateTime.Now;
            FuctionPack F     = new FuctionPack();
            DataTable   DT    = new DataTable();

            GetDataDB(ref DT);

            for (int i = 0; i < DT.Rows.Count; i++)
            {
                string RequestApi = string.Format("http://localhost:50199/api/qrcode?QR_code='{0}'&QR_time='{1:yyyyMMdd}'", DT.Rows[i]["TK_QRCODE"].ToString(), DT.Rows[i]["TK_USED_DT"].ToString());
                F.GetApiData(RequestApi);
                updatedb(F.obj, indbT, DT.Rows[i]["TK_QRCODE"].ToString(), DT.Rows[i]["TK_USED_DT"].ToString());
            }
        }
Ejemplo n.º 3
0
        private void GetAllProducts()
        {
            FuctionPack F          = new FuctionPack();
            string      beginT     = string.Format("{0:yyyy/MM/dd HH:00:00}", DateTime.Now);
            string      endT       = string.Format("{0:yyyy/MM/dd HH:00:00}", DateTime.Now.AddHours(1));
            string      RequestApi = string.Empty;
            string      Pro_code   = (string)checkBox1.Text.ToString();
            string      Pro_code2  = (string)checkBox2.Text.ToString();

            if (checkBox2.Checked == true)
            {
                RequestApi = string.Format("http://localhost:54191/api/tic?Products_Code={0}|{1}&Orders_STIME={2}&Orders_ETIME={3}", Pro_code, Pro_code2, beginT, endT);
            }
            else
            {
                RequestApi = string.Format("http://localhost:54191/api/tic?Products_Code={0}&Orders_STIME={1}&Orders_ETIME={2}", Pro_code, beginT, endT);
            }
            DateTime indbT = DateTime.Now;

            F.GetApiData(RequestApi);
            insertdb(F.obj, indbT);
        }