protected void Page_Load(object sender, EventArgs e)
    {
        string code = Master.TextBoxCode.Text.Trim();

        Master.TextBoxCode.Text = "";

        if (code.Length == 0)
        {
            return;
        }


        if (rdbProductCodeIn.Checked)
        {
            if (BarcodeBLL.IsValidProductCode(code))
            {
                ProductCodeInList = receiptBLL.AddProductCodeIn(BarcodeBLL.ParseProductCode(code));
                DataListProductIn.DataBind();
            }
        }
        else if (rdbProductCodeOut.Checked)
        {
            if (BarcodeBLL.IsValidProductCode(code))
            {
                ProductCodeOutList = receiptBLL.AddProductCodeOut(BarcodeBLL.ParseProductCode(code));
                DataListProductOut.DataBind();
            }
        }
    }
    protected void btnProductCodeIn_Click(object sender, ImageClickEventArgs e)
    {
        ImageButton btn = sender as ImageButton;

        if (btn != null)
        {
            ProductCodeInList.Remove(btn.CommandArgument);
            DataListProductIn.DataBind();
        }
    }
Beispiel #3
0
        protected void btnReset_Click(object sender, EventArgs e)
        {
            ProductCodeInList.Clear();
            DataListProductIn.DataBind();

            GridViewVolume.DataBind();

            DINInList.Clear();
            DataListDINIn.DataBind();

            rdbDINIn.Checked         = false;
            rdbProductCodeIn.Checked = true;
        }
    public void DisplayToGUI()
    {
        Receipt e = ReceiptBLL.Get(ReceiptID);

        if (e == null)
        {
            e = new Receipt();
            ProductCodeInList.Clear();
            ProductCodeOutList.Clear();
            rdbProductCodeIn.Checked = true;
        }
        else
        {
            ProductCodeInList  = e.ReceiptProducts.Where(r => r.Type == ReceiptProduct.TypeX.In).Select(r => r.ProductCode).ToList();
            ProductCodeOutList = e.ReceiptProducts.Where(r => r.Type == ReceiptProduct.TypeX.Out).Select(r => r.ProductCode).ToList();
        }

        txtName.Text = e.Name;
        txtNote.Text = e.Note;

        DataListProductIn.DataBind();
        DataListProductOut.DataBind();
    }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string code = Master.TextBoxCode.Text.Trim();

            Master.TextBoxCode.Text = "";

            if (code.Length == 0)
            {
                return;
            }


            if (rdbProductCodeIn.Checked)
            {
                if (BarcodeBLL.IsValidProductCode(code))
                {
                    ProductCodeInList = productionBLL.AddProductCodeIn4Divide(BarcodeBLL.ParseProductCode(code));
                    DataListProductIn.DataBind();

                    GridViewVolume.DataSource = ProductionBLL.GetDivideList(code).Select(r => new
                    {
                        Division = r,
                        Volume   = "",
                    });
                    GridViewVolume.DataBind();
                }
            }
            else if (rdbDINIn.Checked)
            {
                if (BarcodeBLL.IsValidDINCode(code))
                {
                    DINInList = productionBLL.AddDIN4Divide(BarcodeBLL.ParseDIN(code));
                    DataListDINIn.DataBind();
                }
            }
        }