Exemplo n.º 1
0
        private void xrTableCell15_PreviewClick(object sender, PreviewMouseEventArgs e)
        {
            baocaocongno131 bccn = new baocaocongno131();

            for (int i = 0; i < dt1.Rows.Count; i++)
            {
                if (dt1.Rows[i][0].ToString() == e.Brick.Text)
                {
                    if (gen.GetString("select Top 1 CompanyTaxCode from Center") == "1801115004" && kho1.ToUpper() == "E074A43F-0D0E-4D8F-BE2C-BFA6B32DBD5F")
                    {
                        Frm_nhapxuat F = new Frm_nhapxuat();
                        F.gettsbt("tsbtbccn131bienbanxacnhannochitiet");
                        F.getngay(tungay1);
                        F.getdenngay(denngay1);
                        F.getrole(e.Brick.Text);
                        if (dt1.Rows[i][6].ToString() != "")
                        {
                            F.getcongty(dt1.Rows[i][6].ToString());
                        }
                        else
                        {
                            F.getcongty("-" + dt1.Rows[i][7].ToString());
                        }
                        F.getdauky(dt1.Rows[i][5].ToString());
                        F.getkho(kho1);
                        F.ShowDialog();
                    }
                    else
                    {
                        if (dt1.Rows[i][2].ToString() != "")
                        {
                            bccn.loadchitietnothucte(e.Brick.Text, tungay1, denngay1, kho1, dt1.Rows[i][2].ToString(), loai);
                        }
                        else
                        {
                            bccn.loadchitietnothucte(e.Brick.Text, tungay1, denngay1, kho1, "-" + dt1.Rows[i][3].ToString(), loai);
                        }
                    }
                }
            }
        }