Beispiel #1
0
        public static int nNewQuocGiaID = 0;     // ID cua quoc gia moi them vao

        public QLNS_ThongTinNV()
        {
            InitializeComponent();
            oCNVC = new CNVC();
            dtCNVC = new DataTable();
            dtAvatar = new DataTable();
            dtCMND = new DataTable();
            dtTinhTP = new DataTable();
            dtQuocGia = new DataTable();
            oTinhTP = new Business.TinhTP();
            oQuocGia = new Business.QuocGia();
            oCMND_HoChieu = new CNVC_CMND_HoChieu();
            oFile = new CNVC_File();
            oFTP = new Business.FTP();
            AvatarPath = new string[1];
        }
Beispiel #2
0
        private void bw_upload_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (ServerPaths.Count() > 0)
            {
                MessageBox.Show("Quá trình đăng tập tin lên server thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                lbl_Status.Text = "Đăng hình hoàn tất!";

                try
                {
                    oFile = new CNVC_File();
                    if (Program.selected_ma_nv != "")
                        oFile.MaNV = Program.selected_ma_nv;
                    else
                        oFile.MaNV = txt_MaNV.Text.Trim();

                    oFile.Group.Add(AvatarFileGroup);
                    oFile.Link.Add(oFile.MaNV);
                    oFile.MoTa.Add("Hình đại diện");

                    oFile.AddFileArray(ServerPaths);

                }
                catch (Exception)
                {
                    MessageBox.Show("Quá trình lưu tập tin không thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                ((Form)this.Parent.Parent.Parent.Parent.Parent).ControlBox = true;
                this.Enabled = true;
                oFile.DisputeObject();
            }
        }