Ejemplo n.º 1
0
        private void ShowData()
        {
            if (ItemData.Id != 0)
            {
                txtId.Text = ItemData.Id.ToString("0000");
            }

            txtLastname.Text      = ItemData.Name.Lastname;
            txtFirstname.Text     = ItemData.Name.Firstname;
            txtMiddlename.Text    = ItemData.Name.Middlename;
            txtMi.Text            = ItemData.Name.MiddleInitial;
            cboNameExtension.Text = ItemData.Name.NameExtension;

            txtMaidenMiddlename.Text = ItemData.Name.MaidenMiddlename;

            cboGender.Text    = ItemData.Gender == GenderType.Male ? "Male" : "Female";
            dtBirthdate.Value = ItemData.BirthDate;

            cboCountry.Text  = ItemData.BirthCountry;
            cboProvince.Text = ItemData.BirthProvince;
            cboTown.Text     = ItemData.BirthTown;


            txtImageFile.Text = ItemData.CameraCounter;


            //Mobile Numbers
            ItemData.MobileNumbers.LoadItemsFromDb();
            Show_MobileNumbers();

            //Show Picture
            InputControls.LoadImage(picImage, ItemData.CameraCounter);

            ShowFileInfo(ItemData);
        }
        private void ShowData()
        {
            ShowName(ItemData.PersonClass);

            lblCameraCounter.Text = ItemData.PersonClass.CameraCounter;

            InputControls.LoadImage(picImage, ItemData.PersonClass.CameraCounter);


            ItemData.BiometricLogs.LoadAllItems();

            Show_LogsToCalendar(ItemData.BiometricLogs.Items);
        }
        private void ShowData()
        {
            if (ItemData.Id == 0)
            {
                return;
            }

            InputControls.LoadImage(picImage, ItemData.PersonClass.CameraCounter);

            ShowPersonInfo(ItemData.PersonClass);

            txtStudNum.Text = ItemData.StudentNumber.ToString();


            txtSection.Tag  = ItemData.SectionClass;
            txtSection.Text = ItemData.SectionClass.SectionName;


            ShowFileInfo(ItemData);

            DirtyStatus.Clear();
        }
 private void ShowPersonInfo(Person personInfo)
 {
     Show_NameProfile(personInfo);
     InputControls.LoadImage(picImage, personInfo.CameraCounter);
 }
Ejemplo n.º 5
0
        private void UploadAndDisplayImage(string fullFilename)
        {
            Cursor.Current = Cursors.WaitCursor;

            string errorMessage = null;

            //var uploadResult = await Task.Run(() =>
            //{
            var username = "******";      //AiTech.LiteOrm.Database.Connection.MyDbCredential.Username;
            var password = "******"; //AiTech.LiteOrm.Database.Connection.MyDbCredential.Password;

            var credential = new NetworkCredential {
                UserName = username, Password = password, Domain = Connection.MyDbCredential.ServerName
            };


            var ftp = new FtpClass(credential);


            ftp.Progress += delegate(object sender, cFTPEventHandlerArgs args)
            {
                Invoke((MethodInvoker) delegate
                {
                    lblSpace.Text = args.CompletedBytes.ToString();
                    lblSpace.Refresh();
                    BarImage.Refresh();
                    this.Refresh();
                });
            };

            ftp.Completed += (s, e) =>
            {
                Invoke((MethodInvoker) delegate
                {
                    lblSpace.Text = "";
                    lblSpace.Refresh();
                });
            };


            var result = ftp.UploadFile(fullFilename, "/amwp/pictures/");

            errorMessage = "";

            if (!result)
            {
                errorMessage = ftp.LastError;
                MessageDialog.Show(this, "FTP Error", errorMessage);
            }

            //    return result;
            //});


            if (!result)
            {
                MessageDialog.ShowValidationError(this, errorMessage);
            }
            else
            {
                InputControls.LoadImage(picImage, txtImageFile.Text);
            }
        }
        private void ShowData()
        {
            try
            {
                Show_NameProfile();

                InputControls.LoadImage(picImage, ItemData.EmployeeClass.PersonClass.CameraCounter);

                switchActive.Value = ItemData.Active;


                txtTin.Text        = ItemData.Tin;
                txtPhilHealth.Text = ItemData.PhilHealth;
                txtPagIbig.Text    = ItemData.PagIbig;
                txtSSS.Text        = ItemData.SSS;

                dtDateHired.Value  = ItemData.DateHired;
                cboDepartment.Text = ItemData.Department;

                // Match Position
                foreach (var p in cboPosition.Items)
                {
                    if (((PositionSalaryGrade)p).PositionId != ItemData.PositionId)
                    {
                        continue;
                    }
                    cboPosition.SelectedItem = p;
                    break;
                }

                cboStep.Text = ItemData.Step.ToString();

                // Match Tax Code
                foreach (var t in cboTax.Items)
                {
                    if (((Tax)t).Id != ItemData.TaxId)
                    {
                        continue;
                    }
                    cboTax.SelectedItem = t;
                    break;
                }


                // Deductions
                if (ItemData.Id != 0)
                {
                    Load_Deductions();
                }

                Show_Deductions();


                expandableSplitter1.Expanded = ItemData.Id != 0;

                ShowBasicSalary();

                ShowFileInfo(ItemData);

                DirtyStatus.Clear();
            }
            catch (Exception ex)
            {
                MessageDialog.ShowError(ex, this);
            }
        }