Example #1
0
        private void insl_Click(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            if (pt == "pnkvtddh")
            {
                F.gettsbt("pnkvosl");
                F.getrole(gen.GetString("select RefID from INInwardSU where RefNo='" + txtsct.Text + "'"));
            }
            else
            {
                F.gettsbt(pt + "vosl");
                F.getrole(role);
            }
            F.ShowDialog();
        }
Example #2
0
        private void tsbtin_Click(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt(pt);
            F.getrole(role);
            F.Show();
        }
Example #3
0
        private void tsbtin_Click(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt("pxhmtlbienbantra");
            F.getrole(role);
            F.ShowDialog();
        }
Example #4
0
        private void tsbtin_ButtonClick(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            if (pt == "pnkvtddh")
            {
                F.gettsbt("pnkvo");
                F.getrole(gen.GetString("select RefID from INInwardSU where RefNo='" + txtsct.Text + "'"));
            }
            else
            {
                F.gettsbt(pt + "vo");
                F.getrole(role);
            }
            F.getcongty("CÔNG TY CỔ PHẦN VẬT TƯ HẬU GIANG");
            F.ShowDialog();
        }
Example #5
0
        private void toolddh_Click(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt("tsbthdmhkpnphieu");
            F.getrole(role);
            F.ShowDialog();
        }
Example #6
0
        private void pnvlpg_Click(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt("hdmhvosl");
            F.getrole(role);
            F.ShowDialog();
        }
Example #7
0
        private void hdmhpnk_Click(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt("pnk");
            F.getrole(gen.GetString("select ShippingMethodID from PUInvoice where RefID='" + role + "'"));
            F.ShowDialog();
        }
Example #8
0
        private void tsbtin_ButtonClick(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt(pt + "lpg");
            F.getrole(role);
            F.getcongty("CÔNG TY CỔ PHẦN VẬT TƯ HẬU GIANG");
            F.ShowDialog();
        }
Example #9
0
        private void toolbbgnh_Click(object sender, EventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt("tsbthdmhkpnbienban");
            F.getrole(role);
            F.getkho("0");
            F.ShowDialog();
        }
Example #10
0
        public void loadbangkebanhangtheongay(string ngaychungtu, string ngaycuoi, string manhanvien)
        {
            manhanvien = gen.GetString("select AccountingObjectID from AccountingObject where AccountingObjectID='" + manhanvien + "'");
            DataTable    temp = gen.GetTable("select substring(RefNo,4,12) as 'Số phiếu',JournalMemo as 'Đơn hàng', AccountingObjectCode as 'Mã khách', a.AccountingObjectName as 'Tên khách' ,a.AccountingObjectAddress as 'Địa chỉ',TotalAmountOC+TotalAmount-(TotalFreightAmount/(1+Cast(Tax as money)/100)) as 'Số tiền' from INOutward a, AccountingObject b where a.AccountingObjectID=b.AccountingObjectID and RefDate>='" + ngaychungtu + "' and RefDate<='" + ngaycuoi + "' and EmployeeIDSA='" + manhanvien + "' order by AccountingObjectCode");
            Frm_nhapxuat F    = new Frm_nhapxuat();

            F.getdata(temp);
            F.getngay(ngaychungtu);
            F.getrole(manhanvien);
            F.gettsbt("bkthbhtnvkd");
            F.ShowDialog();
        }
Example #11
0
        private void xrLabel7_PreviewClick(object sender, PreviewMouseEventArgs e)
        {
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.gettsbt(tsbtID);
            F.getrole(roleID);
            if (loaiID == "0")
            {
                F.getkho("1");
            }
            else
            {
                F.getkho("0");
            }
            F.ShowDialog();
            ThisF.Close();
        }
Example #12
0
        public void loadbangkehangtheongayin(string ngaychungtu, string userid)
        {
            DataTable dt   = new DataTable();
            DataTable temp = new DataTable();

            dt.Columns.Add("Mã hàng", Type.GetType("System.String"));
            dt.Columns.Add("Tên hàng", Type.GetType("System.String"));
            dt.Columns.Add("Số lượng", Type.GetType("System.Double"));
            dt.Columns.Add("Trọng lượng", Type.GetType("System.Double"));
            dt.Columns.Add("Khuyến mãi", Type.GetType("System.Double"));
            dt.Columns.Add("Đơn vị tính", Type.GetType("System.String"));
            string manhanvien = null;

            temp = gen.GetTable("select InventoryItemCode,InventoryItemName,SUM(Quantity),SUM(QuantityConvert),UnitPriceOC,sum(AmountOC),case when Quantity=0 then c.ConvertUnit else c.Unit end as loai,EmployeeIDSACode from INOutward a,INOutwardDetail b, InventoryItem c, (select * from OpeningAccountEntry131TT where EmployeeIDSAName='" + userid + "') d where a.RefNo=d.RefNo and a.RefID=b.RefID and b.InventoryItemID=c.InventoryItemID and RefType<>'1' group by InventoryItemCode,InventoryItemName,UnitPriceOC,EmployeeIDSACode,case when Quantity=0 then c.ConvertUnit else c.Unit end order by UnitPriceOC DESC,SUBSTRING(InventoryItemCode,8,2),InventoryItemCode");

            for (int i = 0; i < temp.Rows.Count; i++)
            {
                DataRow dr = dt.NewRow();
                dr[0] = temp.Rows[i][0];
                dr[1] = temp.Rows[i][1];
                if (Double.Parse(temp.Rows[i][4].ToString()) != 0)
                {
                    dr[2] = temp.Rows[i][2];
                    dr[3] = temp.Rows[i][3];
                }
                else
                {
                    dr[4] = temp.Rows[i][3];
                }
                dr[5]      = temp.Rows[i][6];
                manhanvien = temp.Rows[i][7].ToString();
                dt.Rows.Add(dr);
            }
            if (manhanvien != null)
            {
                manhanvien = gen.GetString("select AccountingObjectID from AccountingObject where AccountingObjectCode='" + manhanvien + "'");
                Frm_nhapxuat F = new Frm_nhapxuat();
                F.getdata(dt);
                F.getngay(ngaychungtu);
                F.getrole(manhanvien);
                F.gettsbt("bkthbhtnvkdintong");
                F.ShowDialog();
            }
        }
Example #13
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);
                        }
                    }
                }
            }
        }
Example #14
0
        public void loadbangkehangtheongayin(string ngaychungtu, string ngaycuoi, string manhanvien)
        {
            DataTable dt   = new DataTable();
            DataTable temp = new DataTable();

            dt.Columns.Add("Mã hàng", Type.GetType("System.String"));
            dt.Columns.Add("Tên hàng", Type.GetType("System.String"));
            dt.Columns.Add("Số lượng", Type.GetType("System.Double"));
            dt.Columns.Add("Trọng lượng", Type.GetType("System.Double"));
            dt.Columns.Add("Khuyến mãi", Type.GetType("System.Double"));
            dt.Columns.Add("Đơn vị tính", Type.GetType("System.String"));

            temp = gen.GetTable("select InventoryItemCode,InventoryItemName,SUM(Quantity),SUM(QuantityConvert),UnitPriceOC,sum(AmountOC),case when Quantity=0 then c.ConvertUnit else c.Unit end as loai from INOutward a,INOutwardDetail b, InventoryItem c where a.RefID=b.RefID and b.InventoryItemID=c.InventoryItemID and RefDate>='" + ngaychungtu + "' and RefDate<='" + ngaycuoi + "' and EmployeeIDSA='" + manhanvien + "' and RefType<>'1' group by InventoryItemCode,InventoryItemName,UnitPriceOC,case when Quantity=0 then c.ConvertUnit else c.Unit end order by UnitPriceOC DESC,SUBSTRING(InventoryItemCode,8,2),InventoryItemCode");

            for (int i = 0; i < temp.Rows.Count; i++)
            {
                DataRow dr = dt.NewRow();
                dr[0] = temp.Rows[i][0];
                dr[1] = temp.Rows[i][1];
                if (Double.Parse(temp.Rows[i][4].ToString()) != 0)
                {
                    dr[2] = temp.Rows[i][2];
                    dr[3] = temp.Rows[i][3];
                }
                else
                {
                    dr[4] = temp.Rows[i][3];
                }
                dr[5] = temp.Rows[i][6];
                dt.Rows.Add(dr);
            }
            Frm_nhapxuat F = new Frm_nhapxuat();

            F.getdata(dt);
            F.getngay(ngaychungtu);
            F.getrole(manhanvien);
            F.gettsbt("bkthbhtnvkdintong");
            F.ShowDialog();
        }