Exemplo n.º 1
0
        //protected void txtBarcode_TextChanged(object sender, EventArgs e)
        //{

        //    string barcode = txtBarcode.Text;

        //    stamp_1(barcode);

        //    string sql = "Select * from job_trailer where job_id = " + barcode;
        //    DataTable dt;
        //   dt =  GetData(sql);
        //   grid.DataSource = dt;
        //   grid.DataBind();

        //}

        protected void stamp_1(string job_id)
        {
            BLL.job _BLL = new BLL.job();
            _BLL.Update_stamp1(job_id);
        }
Exemplo n.º 2
0
        protected void txtBarcode_TextChanged(object sender, EventArgs e)
        {
            string barcode = txtBarcode.Text;



            //GET STATUS BARCODE IF STATUS 1 CALL Stamp1
            //STATUS 2 (stamp1 && stamp2 = true) CALL stamp3
            //STATUS 3 CALL stamp4

            int retStatus;

            BLL.job _BLL = new BLL.job();
            retStatus = _BLL.GetStatus_Barcode(barcode);

            switch (retStatus)
            {
            case 1:
                _BLL.Update_stamp1(barcode);
                break;

            case 2:
                _BLL.Update_stamp3(barcode);

                Session["TIME"] = DateTime.Now;



                break;

            case 3:


                if (Session["TIME"] != null)
                {
                    DateTime dt2 = (DateTime)Session["TIME"];
                    DateTime dt3 = DateTime.Now;
                    TimeSpan span;
                    span = dt3.Subtract(dt2);

                    if (span.Minutes > 1)
                    {
                        _BLL.Update_stamp4(barcode);
                    }
                }
                else
                {
                    _BLL.Update_stamp4(barcode);
                }
                break;
            }

            txtBarcode.Text = "";
            BindGrid();

            // string sql = "Select * from job_trailer where job_id = " + barcode;
            // DataTable dt;
            //dt =  GetData(sql);
            //grid.DataSource = dt;
            //grid.DataBind();
        }