예제 #1
0
        //Chọn chức vụ dưới gridcontrol -> đưa lên comboboxchucvu
        public void ChonChucVu(FormNhanVien fnv)
        {
            var chucvutam = fnv.gridView1.GetRowCellValue(fnv.gridView1.FocusedRowHandle, "MACV").ToString();
            var cv        = data.Database().CHUCVUs.SingleOrDefault(c => c.MACV == chucvutam);

            fnv.comboBoxchucvu.Text = cv.TENCV;
        }
예제 #2
0
        private void barButnhanvien_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormNhanVien nv = new FormNhanVien();

            nv.MdiParent = this;
            nv.Show();
        }
예제 #3
0
        //Load gridcontrol
        public void LoadChucVu(FormNhanVien fnv)
        {
            var cv = data.Database().CHUCVUs.ToList();

            fnv.comboBoxchucvu.DataSource    = cv;
            fnv.comboBoxchucvu.DisplayMember = "TENCV";
            fnv.comboBoxchucvu.ValueMember   = "MACV";
        }
예제 #4
0
        public void LoadData(FormNhanVien fnv)
        {
            var nv = data.Database().NHANVIENs.ToList();

            fnv.gridControlNhanVien.DataSource = nv;

            //Load Mã Nhân Viên
            int dem  = 10;
            int kyso = (int)data.Database().RETURN_KYSO("NV");
            int len  = kyso.ToString().Length;

            dem = dem - 2 - len;
            string kq = "NV";

            for (int i = 1; i <= dem; i++)
            {
                kq += "0";
            }
            fnv.txtmanhanvien.Text = kq + kyso.ToString();
        }