当前位置: 首页>>代码示例>>C#>>正文


C# DataAccess.updateQuyenTruycap方法代码示例

本文整理汇总了C#中BKIT.Model.DataAccess.updateQuyenTruycap方法的典型用法代码示例。如果您正苦于以下问题:C# DataAccess.updateQuyenTruycap方法的具体用法?C# DataAccess.updateQuyenTruycap怎么用?C# DataAccess.updateQuyenTruycap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BKIT.Model.DataAccess的用法示例。


在下文中一共展示了DataAccess.updateQuyenTruycap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: chkListBoxPermission_ItemCheck

        private void chkListBoxPermission_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e)
        {
            if (enableItemCheckEvent == false)
                return;
            DataAccess da = new DataAccess();
            Nhanvien employee = da.getNhanvienbyUserName(currentItem.Username);
            QuyenTruycap permission = da.getQuyenTruycapByID(employee.IDQuyenTruycap);

            permission.Vanhanh = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Vanhanh)].CheckState);

            permission.HoadonNhap = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Hoadonnhap)].CheckState);

            permission.Setting = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Caidat)].CheckState);

            permission.Nhanvien = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Nhanvien)].CheckState);

            permission.HoadonxuatSP = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Hoadonxuat)].CheckState);

            permission.Sanpham = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Sanpham)].CheckState);

            permission.Phong = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Phong)].CheckState);

            permission.Report = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Baocao)].CheckState);

            permission.Khachhang = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Khachhang)].CheckState);

            permission.Khuyenmai = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Khuyenmai)].CheckState);

            permission.Tonkho = Convert.ToInt32(
                chkListBoxPermission.Items[Convert.ToInt32(Quyen.Tonkho)].CheckState);

            if (lblStatusUpdatePermission.ForeColor == System.Drawing.Color.Black)
            {
                lblStatusUpdatePermission.ForeColor = System.Drawing.Color.Blue;
            }
            else
            {
                lblStatusUpdatePermission.ForeColor = System.Drawing.Color.Black;
            }

            permission.IDQuyentruycap = employee.IDQuyenTruycap;
            permission.TenLoaiNV = employee.Loai;
            permission.Ngaythietlap = DateTime.Now.Date;
            da.updateQuyenTruycap(permission);
        }
开发者ID:vtthanh83,项目名称:Karaoke,代码行数:55,代码来源:frmEmployeeManager.cs

示例2: simpleButtonDefaut_Click

 private void simpleButtonDefaut_Click(object sender, EventArgs e)
 {
     DataAccess da = new DataAccess();
     Nhanvien emp = da.getNhanvienbyUserName(currentItem.Username);
     QuyenTruycap quyentruycap = getDefaultPermissionByGroupname(emp.Loai);
     quyentruycap.IDQuyentruycap = emp.IDQuyenTruycap;
     quyentruycap.TenLoaiNV = emp.Loai;
     quyentruycap.Ngaythietlap = DateTime.Now.Date;
     da.updateQuyenTruycap(quyentruycap);
     Update_Info();
 }
开发者ID:vtthanh83,项目名称:Karaoke,代码行数:11,代码来源:frmEmployeeManager.cs

示例3: cboUserGroupName_Leave

        private void cboUserGroupName_Leave(object sender, EventArgs e)
        {
            string username = currentItem.Username;
            DataAccess da = new DataAccess();
            Nhanvien emp = da.getNhanvienbyUserName(username);

            // Admin can not modify "Admin" GroupName
            if ((emp.Loai == "Quản lý") || (username == Program.username))
            {
                cboUserGroupName.Text = emp.Loai;
                return;
            }
            else
            {
                lblStatusThongTinTaiKhoan.Text = "";
                string s = cboUserGroupName.Text;
                if (!string.Equals(s, oldSelectedNhanvien.Loai))
                {
                    emp.Loai = s;
                    da.updateNhanvien(emp);
                    QuyenTruycap quyentruycap = getDefaultPermissionByGroupname(cboUserGroupName.Text);
                    quyentruycap.IDQuyentruycap = emp.IDQuyenTruycap;
                    quyentruycap.TenLoaiNV = s;
                    quyentruycap.Ngaythietlap = DateTime.Now.Date;
                    da.updateQuyenTruycap(quyentruycap);

                    int selectedIndex = currentIndex;
                    customListBoxOtherUser.Items.Clear();
                    LoadOtherUser("");
                    customListBoxOtherUser.SelectedIndex = selectedIndex;
                }
            }
        }
开发者ID:vtthanh83,项目名称:Karaoke,代码行数:33,代码来源:frmEmployeeManager.cs


注:本文中的BKIT.Model.DataAccess.updateQuyenTruycap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。