Beispiel #1
0
        public static bool Insert(HoSo_LuuTru dto)
        {
            try
            {
                VNSCDataContext VNSC = SQL_Connection.CreateSQlConnection();

                VNSC.HoSo_LuuTrus.InsertOnSubmit(dto);
                VNSC.SubmitChanges();
                return true;
            }
            catch (System.Exception ex)
            {
                return false;
            }
        }
Beispiel #2
0
        private bool InsertLuuTru()
        {
            if (LuuTru_BUS.Insert(dto_LuuTru))
            {
                dto_HoSo_LuuTru = new HoSo_LuuTru();

                dto_HoSo_LuuTru.MaHoSo = tbMa_LLCN.Text.Substring(0, 4);
                List<LuuTru> list_Temp = LuuTru_BUS.LayDSLuuTru();
                dto_HoSo_LuuTru.MaLuuTru = list_Temp[list_Temp.Count - 1].Ma;

                if (!HoSo_LuuTru_BUS.Insert(dto_HoSo_LuuTru))
                {
                    return false;
                }
            }
            else
            {
                return false;
            }

            return true;
        }
Beispiel #3
0
        public static bool UpdateHoSo_LuuTruInfo(HoSo_LuuTru dto)
        {
            //try
            //{
            //    VNSCDataContext VNSC = SQL_Connection.CreateSQlConnection();
            //    HoSo_LuuTru sk = VNSC.HoSo_LuuTrus.Single(P => P.Ma == dto.Ma);
            //    sk.MaNhomTrachVu = dto.MaNhomTrachVu;
            //    //sk.Ten = dto.Ten;
            //    //sk.MoTa = dto.MoTa;

            //    VNSC.SubmitChanges();
            //    return true;
            //}
            //catch (System.Exception ex)
            //{
            //    return false;
            //}

            return false; //Khong co update
        }
 partial void DeleteHoSo_LuuTru(HoSo_LuuTru instance);
Beispiel #5
0
        private void UC_HoSoCaNhan_Load(object sender, EventArgs e)
        {
            list_IDV = new List<int>();
            list_NhomTrachVu = new List<string>();
            list_TrachVu = new List<string>();

            cbIDV_LLCN.Items.Add(" ");
            LayDSIDV_ComboBox(cbIDV_LLCN);

            if (!LayDSNhomTrachVu_ComboBox(cbNhomTrachVu_LLCN))
            {
                this.Visible = false;
                Form_Notice frm = new Form_Notice("Chưa khởi tạo Nhóm trách vụ!", false);
                return;
            }
            else
            {
                this.Visible = true;
            }

            if (!LayDSTrachVu_ComboBox(cbTrachVu_LLCN))
            {
                this.Visible = false;
                Form_Notice frm = new Form_Notice("Chưa khởi tạo Trách vụ!", false);
                return;
            }
            else
            {
                this.Visible = true;
            }

            LoadPic();
            this.Size = new System.Drawing.Size(800, 600);

            pnQuanLy.Size = new System.Drawing.Size(770, 485);
            pnQuanLy.Location = SubFunction.SetWidthCenter(this.Size, pnQuanLy.Size, 100);

            lbTitle.Left = lbSelect.Left;
            lbSelect.Text = "";

            pnLyLich.Size = new System.Drawing.Size(550, 545);
            pnLyLich.Location = SubFunction.SetWidthCenter(this.Size, pnLyLich.Size, 50);

            gbLyLichCaNhan.Size = new System.Drawing.Size(550, 545);
            gbLyLichCaNhan.Location = SubFunction.SetWidthCenter(pnLyLich.Size, gbLyLichCaNhan.Size, 0);

            gbLyLichHuongDao.Size = new System.Drawing.Size(550, 545);
            gbLyLichHuongDao.Location = SubFunction.SetWidthCenter(pnLyLich.Size, gbLyLichHuongDao.Size, 0);

            gbNgheNghiep_KiNang.Size = new System.Drawing.Size(550, 545);
            gbNgheNghiep_KiNang.Location = SubFunction.SetWidthCenter(pnLyLich.Size, gbNgheNghiep_KiNang.Size, 0);

            gbHuanLuyen.Size = new System.Drawing.Size(550, 545);
            gbHuanLuyen.Location = SubFunction.SetWidthCenter(pnLyLich.Size, gbHuanLuyen.Size, 0);

            pn_gbHuanLuyen.Size = new System.Drawing.Size(540, 430);
            pn_gbHuanLuyen.Location = SubFunction.SetWidthCenter(gbHuanLuyen.Size, pn_gbHuanLuyen.Size, 50);

            tbPage.Location = new Point(pnPage.Left + 2, pnPage.Top - 1);
            tbPage.LostFocus += new EventHandler(tbPage_LostFocus);

            size_PicRec.Width = 90;
            size_PicRec.Height = 120;
            pnAvatar.Left = pnLyLich.Right + 5;
            pnAvatar.Top = pnLyLich.Top + 10;

            pbAvatar.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.pbAvatar_MouseWheel);

            iZoom = 1;

            list_dto = new List<HoSo>();

            list_UC_HuanLuyen = new List<UC_HuanLuyen>();
            list_UC_HuanLuyen_Insert = new List<UC_HuanLuyen>();
            list_UC_HuanLuyen_Delete = new List<int>();
            list_UC_HuanLuyen_Update = new List<UC_HuanLuyen>();

            dto_HoSo = new HoSo();
            dto_HuanLuyen = new HuanLuyen();
            dto_LuuTru = new LuuTru();
            dto_HoSo_HuanLuyen = new HoSo_HuanLuyen();
            dto_HoSo_LuuTru = new HoSo_LuuTru();

            list_FolderAvatar = new List<string>();
            list_FolderAvatar.Add("DB");
            list_FolderAvatar.Add("Avatar");

            iRows = 20;

            refreshListView();

            Form_Main.CurrentControlName = "UC_HoSoCaNhan";
        }
 partial void UpdateHoSo_LuuTru(HoSo_LuuTru instance);
 partial void InsertHoSo_LuuTru(HoSo_LuuTru instance);
		private void detach_HoSo_LuuTrus(HoSo_LuuTru entity)
		{
			this.SendPropertyChanging();
			entity.LuuTru = null;
		}
		private void attach_HoSo_LuuTrus(HoSo_LuuTru entity)
		{
			this.SendPropertyChanging();
			entity.LuuTru = this;
		}
Beispiel #10
0
 public static bool Insert(HoSo_LuuTru dto)
 {
     return HoSo_LuuTru_DAO.Insert(dto);
 }