本文整理汇总了C#中Common.Utilities.CountDatagridview方法的典型用法代码示例。如果您正苦于以下问题:C# Common.Utilities.CountDatagridview方法的具体用法?C# Common.Utilities.CountDatagridview怎么用?C# Common.Utilities.CountDatagridview使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Common.Utilities
的用法示例。
在下文中一共展示了Common.Utilities.CountDatagridview方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: fix
public void fix()
{
for (int j = 1; j < dtgvChitien.ColumnCount; j++)
{
dtgvChitien.Columns[j].Visible = false;
}
Common.Utilities a = new Common.Utilities();
a.CountDatagridview(dtgvChitien);
dtgvChitien.ReadOnly = true;
dtgvChitien.Columns[0].Visible = true;
dtgvChitien.Columns[0].HeaderText = "STT";
dtgvChitien.Columns["MaPhieuThu"].Visible = true;
dtgvChitien.Columns["MaPhieuThu"].HeaderText = "Mã Phiếu Chi";
dtgvChitien.Columns["NgayLap"].Visible = true;
dtgvChitien.Columns["NgayLap"].HeaderText = "Ngày Lập Phiếu";
dtgvChitien.Columns["NguoiNopTien"].Visible = true;
dtgvChitien.Columns["NguoiNopTien"].HeaderText = "Người Nộp Tiền";
dtgvChitien.Columns["NguoiNhanTien"].Visible = true;
dtgvChitien.Columns["NguoiNhanTien"].HeaderText = "Người Nhận Tiền";
dtgvChitien.Columns["TongTienThanhToan"].Visible = true;
dtgvChitien.Columns["TongTienThanhToan"].HeaderText = "Tổng Thanh Toán";
dtgvChitien.Columns["GhiChu"].Visible = true;
dtgvChitien.Columns["GhiChu"].HeaderText = "Ghi Chú";
dtgvChitien.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dtgvChitien.AllowUserToAddRows = false;
dtgvChitien.AllowUserToDeleteRows = false;
dtgvChitien.AllowUserToResizeRows = false;
this.Focus();
}
示例2: fix
public void fix()
{
for (int j = 1; j < dtgvThanhtoanNCC.ColumnCount; j++)
{
dtgvThanhtoanNCC.Columns[j].Visible = false;
}
Common.Utilities a = new Common.Utilities();
a.CountDatagridview(dtgvThanhtoanNCC);
dtgvThanhtoanNCC.ReadOnly = true;
dtgvThanhtoanNCC.Columns["HanhDong"].Visible = true;
dtgvThanhtoanNCC.Columns["HanhDong"].HeaderText = "STT";
dtgvThanhtoanNCC.Columns["MaPhieuTTNCC"].Visible = true;
dtgvThanhtoanNCC.Columns["MaPhieuTTNCC"].HeaderText = "Mã Phiếu Thanh Toán";
dtgvThanhtoanNCC.Columns["TenNhaCungCap"].HeaderText = "Tên Nhà Cung Cấp";
dtgvThanhtoanNCC.Columns["TenNhaCungCap"].Visible = true;
dtgvThanhtoanNCC.Columns["NgayLap"].HeaderText = "Ngày Lập";
dtgvThanhtoanNCC.Columns["NgayLap"].Visible = true;
dtgvThanhtoanNCC.Columns["NoHienThoi"].HeaderText = "Nợ Hiện Thời";
dtgvThanhtoanNCC.Columns["NoHienThoi"].Visible = true;
dtgvThanhtoanNCC.Columns["GhiChu"].Visible = true;
dtgvThanhtoanNCC.Columns["GhiChu"].HeaderText = "Ghi Chú";
dtgvThanhtoanNCC.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dtgvThanhtoanNCC.AllowUserToAddRows = false;
dtgvThanhtoanNCC.AllowUserToDeleteRows = false;
dtgvThanhtoanNCC.AllowUserToResizeRows = false;
this.Focus();
}
示例3: fix
public void fix()
{
for (int j = 1; j < dtgvThanhtoanKH.ColumnCount; j++)
{
dtgvThanhtoanKH.Columns[j].Visible = false;
}
Common.Utilities a = new Common.Utilities();
a.CountDatagridview(dtgvThanhtoanKH);
dtgvThanhtoanKH.ReadOnly = true;
dtgvThanhtoanKH.Columns[0].Visible = true;
dtgvThanhtoanKH.Columns[0].HeaderText = "STT";
dtgvThanhtoanKH.Columns["MaPhieuTTCuaKH"].Visible = true;
dtgvThanhtoanKH.Columns["MaPhieuTTCuaKH"].HeaderText = "Mã Phiếu Thanh Toán";
dtgvThanhtoanKH.Columns["TenKhachHang"].HeaderText = "Tên Khách Hàng";
dtgvThanhtoanKH.Columns["TenKhachHang"].Visible = true;
dtgvThanhtoanKH.Columns["NgayLap"].HeaderText = "Ngày Lập Phiếu";
dtgvThanhtoanKH.Columns["NgayLap"].Visible = true;
dtgvThanhtoanKH.Columns["NoHienThoi"].HeaderText = "Nợ Hiện Thời";
dtgvThanhtoanKH.Columns["NoHienThoi"].Visible = true;
dtgvThanhtoanKH.Columns["GhiChu"].Visible = true;
dtgvThanhtoanKH.Columns["GhiChu"].HeaderText = "Ghi Chú";
dtgvThanhtoanKH.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dtgvThanhtoanKH.AllowUserToAddRows = false;
dtgvThanhtoanKH.AllowUserToDeleteRows = false;
dtgvThanhtoanKH.AllowUserToResizeRows = false;
dtgvThanhtoanKH.RowHeadersVisible = false;
this.Focus();
}
示例4: txttimkiem_TextChanged
/// <summary>
/// xử lý khi tìm kiếm
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txttimkiem_TextChanged(object sender, EventArgs e)
{
try
{
if (rdbtimkiem3.Checked == true)
{
return;
}
if (txttimkiem.Text.Length == 0)
{
dtgvThanhtoanNCC.DataSource = new Entities.PhieuTTNCC[0];
return;
}
int soluong = 0;
if (hienthi != null)
{
if (rdbtimkiem2.Checked == true)
{
for (int i = 0; i < hienthi.Length; i++)
{
int kiemtra = hienthi[i].MaPhieuTTNCC.ToString().ToUpper().IndexOf(txttimkiem.Text.ToUpper());
if (kiemtra >= 0)
{
soluong++;
}
}
if (soluong == 0)
{
dtgvThanhtoanNCC.DataSource = new Entities.PhieuTTNCC[0];
return;
}
Entities.PhieuTTNCC[] hienthitheoma = new Entities.PhieuTTNCC[soluong];
soluong = 0;
for (int i = 0; i < hienthi.Length; i++)
{
int kiemtra = hienthi[i].MaPhieuTTNCC.ToString().ToUpper().IndexOf(txttimkiem.Text.ToUpper());
if (kiemtra >= 0)
{
hienthitheoma[soluong] = hienthi[i];
soluong++;
}
}
dtgvThanhtoanNCC.DataSource = hienthitheoma;
}
Common.Utilities a = new Common.Utilities();
a.CountDatagridview(dtgvThanhtoanNCC);
}
}
finally
{
fix();
}
}