コード例 #1
0
 public void LoadForm()
 {
     EmployeeNameBindingSource.DataSource = EmployeeService.GetFirstNameLastNameForDropBox();
     DocumentsStoredDepartmentBindingSource.DataSource = DocumentsStoredDepartmentService.GetAll();
     DocumentsStoredTypeBindingSource.DataSource       = DocumentsStoredTypeService.GetByDeparmentId(Conversions.ToInteger(ddlArea.SelectedValue));
     txtExpireDate.CustomFormat = " ";
     txtIssueDate.CustomFormat  = " ";
     ConfigLayoutForUserPerfil();
 }
コード例 #2
0
 /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
 /* TODO ERROR: Skipped RegionDirectiveTrivia */
 public void LoadForm()
 {
     EmployeeNameBindingSource.DataSource = EmployeeService.GetFirstNameLastNameForDropBox();
     ddlEmployee.SelectedValue            = 0;
     DocumentsStoredDepartmentBindingSource.DataSource = DocumentsStoredDepartmentService.GetAllForDropBox();
     ddlArea.SelectedValue = 0;
     DocumentsStoredTypeBindingSource.DataSource = DocumentsStoredTypeService.GetByDeparmentIdForDropBox(Conversions.ToInteger(ddlArea.SelectedValue), false);
     DocumentsStoredBindingSource.DataSource     = DocumentsStoredService.GetByFilters(txtFileType.Text, txtDecription.Text, "", "", 0, "", "", true);
     txtStartDate.CustomFormat = " ";
     txtEndDate.CustomFormat   = " ";
     ConfigLayoutForUserPerfil();
 }
コード例 #3
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtDocumentType.Text) == false)
            {
                if (DocumentsStoredDepartmentService.VerifyDepartmentEquals(txtDocumentType.Text.TrimEnd().Replace(" ", "_").Replace(",", "_")))
                {
                    // MessageBox.Show("This Department Exists!", "Attention!", MessageBoxButtons.OK, MessageBoxIcon.Warning)
                    My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("This Department Exists!", "Attention!", this);
                    return;
                }
            }
            else
            {
                // MessageBox.Show("Field is empty!", "Attention!", MessageBoxButtons.OK, MessageBoxIcon.Warning)
                My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("Field is empty!", "Attention!", this);
                return;
            }

            if (ftpser.CreateFolder(txtDocumentType.Text.Replace(" ", "_").Replace(",", "_")))
            {
                if (DocumentsStoredDepartmentService.Insert(txtDocumentType.Text.Replace(" ", "_").Replace(",", "_")))
                {
                    My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("Department successfully inserted!", "Success!", this);
                    My.MyProject.Forms.frmAddEditStoreFiles.LoadDepartment(DocumentsStoredDepartmentService.GetLastId());
                    DocumentsStoredUserDepartmentService.Insert(DocumentsStoredDepartmentService.GetLastId(), 163);
                    DocumentsStoredUserDepartmentService.Insert(DocumentsStoredDepartmentService.GetLastId(), 124);
                    DocumentsStoredUserDepartmentService.Insert(DocumentsStoredDepartmentService.GetLastId(), 63);
                    Close();
                }
                else
                {
                    My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("It was not possible to create this Department! Contact IT Department.", "Error!", this);
                    ftpser.DeleteSFTPFolder("/documentstorage/" + txtDocumentType.Text.Replace(" ", "_").Replace(",", "_"));
                }
            }
            else
            {
                My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("It was not possible to create this Department! If necessary Contact IT Department.", "Error!", this);
            }
        }
コード例 #4
0
 public void LoadForm(int DepId)
 {
     DocumentsStoredDepartmentBindingSource.DataSource = DocumentsStoredDepartmentService.GetAll();
     ddlDepartment.SelectedValue = DepId;
     txtDocumentType.Text        = "";
 }
コード例 #5
0
 public void LoadDepartment(int DepartmentId)
 {
     DocumentsStoredDepartmentBindingSource.DataSource = DocumentsStoredDepartmentService.GetAll();
     ddlArea.SelectedValue = DepartmentId;
 }