Exemplo n.º 1
0
        private void Init()
        {
            if (CNThu == true)
            {
                gcMain.DataSource = BUS_CongNo.LoadCNThu();

                gvMain.Columns[0].FieldName = "MaBH";
                gvMain.Columns[1].FieldName = "NgayLap";
                gvMain.Columns[2].FieldName = "MaKH";
                gvMain.Columns[3].FieldName = "TenKH";
                gvMain.Columns[4].FieldName = "SoTienNo";
                gvMain.Columns[5].FieldName = "SoTienTra";
                gvMain.Columns[6].FieldName = "SoTienConNo";
                gvMain.Columns[7].FieldName = "GhiChu";

                Text = "Danh Sách Công Nợ Chi Tiết";

                QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnThuTien");
                if (QuyenNguoiDung.Them == false)
                {
                    btnLapPhieu.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }
            }
            else
            {
                gcMain.DataSource = BUS_CongNo.LoadCNChi();

                gvMain.Columns[0].FieldName = "MaBH";
                gvMain.Columns[1].FieldName = "NgayLap";
                gvMain.Columns[2].FieldName = "MaNCC";
                gvMain.Columns[3].FieldName = "TenNCC";
                gvMain.Columns[4].FieldName = "SoTienNo";
                gvMain.Columns[5].FieldName = "SoTienTra";
                gvMain.Columns[6].FieldName = "SoTienConNo";
                gvMain.Columns[7].FieldName = "GhiChu";

                gvMain.Columns[2].Caption = "Mã NCC";
                gvMain.Columns[3].Caption = "Nhà Cung Cấp";

                Text = "Danh Sách Công Nợ Phải Chi";

                QuyenNguoiDung.LayQuyenNguoiDungTheoChucNang("btnTraTien");
                if (QuyenNguoiDung.Them == false)
                {
                    btnLapPhieu.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }
            }

            gvMain.IndicatorWidth          = 50;
            gvMain.CustomDrawRowIndicator += gvMain_CustomDrawRowIndicator;

            gcMain.UseEmbeddedNavigator = true;
            gcMain.EmbeddedNavigator.Buttons.Append.Visible     = false;
            gcMain.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            gcMain.EmbeddedNavigator.Buttons.Edit.Visible       = false;
            gcMain.EmbeddedNavigator.Buttons.EndEdit.Visible    = false;
            gcMain.EmbeddedNavigator.Buttons.Remove.Visible     = false;
        }
Exemplo n.º 2
0
 private void fDSCongNo_Activated(object sender, EventArgs e)
 {
     if (CNThu == true)
     {
         gcMain.DataSource = BUS_CongNo.LoadCNThu();
     }
     else
     {
         gcMain.DataSource = BUS_CongNo.LoadCNChi();
     }
 }
Exemplo n.º 3
0
 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (CNThu == true)
     {
         gcMain.DataSource = BUS_CongNo.LoadCNThu();
     }
     else
     {
         gcMain.DataSource = BUS_CongNo.LoadCNChi();
     }
 }