Example #1
0
        private void btnDetail_Click(object sender, EventArgs e)
        {
            if (type == "1")
            {
                //nhap tu NCC

                frmSummaryStockInutDetail.code   = code;
                frmSummaryStockInutDetail.date   = date;
                frmSummaryStockInutDetail.price  = price;
                frmSummaryStockInutDetail.branch = branch;
                frmSummaryStockInutDetail.note   = note;

                var f = new frmSummaryStockInutDetail();
                f.MdiParent = WindowsFormsApplication3.Form1.ActiveForm;
                f.Show();
            }
            else
            {
                frmSummaryStockInutDetail.code   = code;
                frmSummaryStockInutDetail.date   = date;
                frmSummaryStockInutDetail.price  = price;
                frmSummaryStockInutDetail.branch = branch;
                frmSummaryStockInutDetail.note   = note;

                var f = new frmSummaryStockInutDetail();
                f.MdiParent = WindowsFormsApplication3.Form1.ActiveForm;
                f.Show();
            }
        }
Example #2
0
        private void dgvGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                var typeId = dgvGrid.Rows[e.RowIndex].Cells["InputType"].Value.ToString();
                type = typeId;
                var codeId = dgvGrid.Rows[e.RowIndex].Cells["StockCode"].Value.ToString();
                code = codeId;
                date = dgvGrid.Rows[e.RowIndex].Cells["CreateAt"].Value.ToString();
                //price = dgvGrid.Rows[e.RowIndex].Cells["TotalPrice"].Value.ToString();
                branch = dgvGrid.Rows[e.RowIndex].Cells["BranchName"].Value.ToString();
                note   = dgvGrid.Rows[e.RowIndex].Cells["Note1"].Value.ToString();

                if (type == "1")
                {
                    //nhap tu NCC

                    frmSummaryStockInutDetail.code   = code;
                    frmSummaryStockInutDetail.date   = date;
                    frmSummaryStockInutDetail.price  = price;
                    frmSummaryStockInutDetail.branch = branch;
                    frmSummaryStockInutDetail.note   = note;

                    var f = new frmSummaryStockInutDetail();
                    f.MdiParent = WindowsFormsApplication3.Form1.ActiveForm;
                    f.Show();
                }
                else
                {
                    frmSummaryStockInutDetail.code   = code;
                    frmSummaryStockInutDetail.date   = date;
                    frmSummaryStockInutDetail.price  = price;
                    frmSummaryStockInutDetail.branch = branch;
                    frmSummaryStockInutDetail.note   = note;

                    var f = new frmSummaryStockInutDetail();
                    f.MdiParent = WindowsFormsApplication3.Form1.ActiveForm;
                    f.Show();
                }
            }
        }