本文整理汇总了C#中BKIT.Model.DataAccess.getAllNhanvien方法的典型用法代码示例。如果您正苦于以下问题:C# DataAccess.getAllNhanvien方法的具体用法?C# DataAccess.getAllNhanvien怎么用?C# DataAccess.getAllNhanvien使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BKIT.Model.DataAccess
的用法示例。
在下文中一共展示了DataAccess.getAllNhanvien方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadOtherUser
private void LoadOtherUser(string added_username)
{
if (Program.userLevel != Level.Admin)
{
TabControlOtherAccount.Enabled = false;
TabControlOtherAccount.Visible = false;
}
else
{
TabControlOtherAccount.Enabled = true;
TabControlOtherAccount.Visible = true;
DataAccess da = new DataAccess();
DataSet ds = da.getAllNhanvien();
int intRowsCount = ds.Tables[0].Rows.Count;
highlightIndex = 0;
for (int i = 0; i < intRowsCount; i++)
{
if (!string.Equals(ds.Tables[0].Rows[i]["Username"].ToString(), Program.username))
{
customListBoxOtherUser.Items.Add(new CustomListBoxItem(
Convert.ToString(ds.Tables[0].Rows[i]["Ten"]),
Convert.ToString(ds.Tables[0].Rows[i]["Username"]),
Convert.ToString(ds.Tables[0].Rows[i]["Loai"])));
if (ds.Tables[0].Rows[i]["Username"].ToString() == added_username)
{
highlightIndex = i;
}
}
}
highlightIndex--;
}
}
示例2: frmReport_Load
private void frmReport_Load(object sender, EventArgs e)
{
DataAccess da = new DataAccess();
DataSet dsNhomSP = da.getAllNhomSP();
//cbTKTenNhomSP.Items.Add("Tất cả");
if (dsNhomSP != null && dsNhomSP.Tables[0] != null)
{
for (int k = 0; k < dsNhomSP.Tables[0].Rows.Count; k++)
{
cbTKTenNhomSP.Items.Add(dsNhomSP.Tables[0].Rows[k]["TenNhomSP"].ToString());
cbTenNhomSP.Items.Add(dsNhomSP.Tables[0].Rows[k]["TenNhomSP"].ToString());
cbDSBHProduct.Items.Add(dsNhomSP.Tables[0].Rows[k]["TenNhomSP"].ToString());
}
}
DataSet dsNhanvien = da.getAllNhanvien();
cbDSHBEmployee.Items.Add("Tất cả");
cbTKHDEmployee.Items.Add("Tất cả");
if (dsNhanvien != null && dsNhanvien.Tables[0] != null)
{
for (int k = 0; k < dsNhanvien.Tables[0].Rows.Count; k++)
{
cbDSHBEmployee.Items.Add(dsNhanvien.Tables[0].Rows[k]["Ten"].ToString());
cbTKHDEmployee.Items.Add(dsNhanvien.Tables[0].Rows[k]["Ten"].ToString());
}
}
DataSet dsPhong = da.getAllPhong();
cbDSBHRoom.Items.Add("Tất cả");
cbDSBHRoom.Items.Add("Bán lẻ");
cbTKHDRoom.Items.Add("Tất cả");
cbTKHDRoom.Items.Add("Bán lẻ");
if (dsPhong != null && dsPhong.Tables[0] != null)
{
for (int k = 0; k < dsPhong.Tables[0].Rows.Count; k++)
{
cbDSBHRoom.Items.Add(dsPhong.Tables[0].Rows[k]["TenPhong"].ToString());
cbTKHDRoom.Items.Add(dsPhong.Tables[0].Rows[k]["TenPhong"].ToString());
}
}
DateTime temp = DateTime.Now;
string month = temp.Month.ToString();
string year = temp.Year.ToString();
for (int i = 0; i < 12; i++)
{
if (month == cbMonthByMonth.Items[i].ToString())
{
cbMonthByMonth.SelectedIndex = i;
}
if (month == cbDSBHMonthByMonth.Items[i].ToString())
{
cbDSBHMonthByMonth.SelectedIndex = i;
}
if (month == cbTKHDByMonthMonth.Items[i].ToString())
{
cbTKHDByMonthMonth.SelectedIndex = i;
}
}
for (int i = 0; i < 30; i++)
{
if (year == cbYearByMonth.Items[i].ToString())
{
cbYearByMonth.SelectedIndex = i;
}
if (year == cbDSBHYearByMonth.Items[i].ToString())
{
cbDSBHYearByMonth.SelectedIndex = i;
}
if (year == cbTKHDByMonthYear.Items[i].ToString())
{
cbTKHDByMonthYear.SelectedIndex = i;
}
}
}