Esempio n. 1
0
 private void fCongNoTraNgay_Activated(object sender, EventArgs e)
 {
     if (CNThu == true)
     {
         gcMain.DataSource = BUS_CongNo.LoadCNThuTraNgay();
     }
     else
     {
         gcMain.DataSource = BUS_CongNo.LoadCNChiTraNgay();
     }
 }
Esempio n. 2
0
 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (CNThu == true)
     {
         gcMain.DataSource = BUS_CongNo.LoadCNThuTraNgay();
     }
     else
     {
         gcMain.DataSource = BUS_CongNo.LoadCNChiTraNgay();
     }
 }
Esempio n. 3
0
        private void Init()
        {
            if (CNThu == true)
            {
                gcMain.DataSource = BUS_CongNo.LoadCNThuTraNgay();

                gvMain.Columns[0].FieldName = "MaBH";
                gvMain.Columns[1].FieldName = "NgayLap";
                gvMain.Columns[2].FieldName = "MaKH";
                gvMain.Columns[3].FieldName = "TenKH";
                gvMain.Columns[4].FieldName = "SoTienConNo";

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

                gvMain.Columns[0].FieldName = "MaBH";
                gvMain.Columns[1].FieldName = "NgayLap";
                gvMain.Columns[2].FieldName = "MaNCC";
                gvMain.Columns[3].FieldName = "TenNCC";
                gvMain.Columns[4].FieldName = "SoTienConNo";

                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;
        }