Ejemplo n.º 1
0
        private void SetDropDownListInGrid(GridViewCommandEventArgs e, int columnIndex, List <DictionaryDto> list)
        {
            var          rowIndex     = int.Parse(e.CommandArgument.ToString());
            DropDownList dropDownList = (DropDownList)_gridView.Rows[rowIndex].Cells[columnIndex].Controls[3];
            var          label        = (Label)_gridView.Rows[rowIndex].Cells[columnIndex].Controls[1];

            PageMethodsHelper.SetDropDownList(dropDownList, list);
            dropDownList.SelectedValue = list.Where(x => x.Name.Equals(label.Text)).Select(y => y.Id).FirstOrDefault().ToString();
        }
Ejemplo n.º 2
0
        private void InitData()
        {
            lbl_nameSurname.Text    = _employeeDto.LastName + " " + _employeeDto.FirstName;
            lbl_EmployeeNumber.Text = _employeeDto.EmployeeNumber;
            lbl_Position.Text       = _employeeMembershipDto.Position;

            PageMethodsHelper.SetDropDownList(ddl_Section, _listSectionDto);
            PageMethodsHelper.SetDropDownList(ddl_OrganizationalUnit, _listOrganizationalUnitDto);
            PageMethodsHelper.SetDropDownList(ddl_OrganizationalCell, _listOrganizationalCellDto);

            btn_SearchFor_Click(null, null);
        }
Ejemplo n.º 3
0
        private void InitData()
        {
            lbl_nameSurname.Text    = _employeeDto.LastName + " " + _employeeDto.FirstName;
            lbl_EmployeeNumber.Text = _employeeDto.EmployeeNumber;
            lbl_Position.Text       = _employeeMembershipDto.Position;
            tb_PositionTable.Text   = _employeeMembershipDto.Position;

            if (_directSupervisorDto != null)
            {
                lbl_DirectSupervisor.Text   = _directSupervisorDto.FirstName + " " + _directSupervisorDto.LastName;
                hf_DirectSupervisorId.Value = _employeeDto.DirectSupervisorID.ToString();
            }
            else
            {
                lbl_DirectSupervisor.Text = Translate("Common", "Lack");
            }

            hf_EmployeeMembershipId.Value = _employeeMembershipDto.Id.ToString();
            up_SearchForss.Update();

            PageMethodsHelper.SetDropDownList(ddl_Section, _listSectionDto);
            PageMethodsHelper.SetDropDownList(ddl_OrganizationalUnit, _listOrganizationalUnitDto);
            PageMethodsHelper.SetDropDownList(ddl_OrganizationalCell, _listOrganizationalCellDto);

            var item = _listSectionDto.Where(x => x.Name == _employeeMembershipDto.Section).FirstOrDefault();

            ddl_Section.Text            = item == null ? "0" : item.Id.ToString();
            item                        = _listOrganizationalUnitDto.Where(x => x.Name == _employeeMembershipDto.OrganizationalUnit).FirstOrDefault();
            ddl_OrganizationalUnit.Text = item == null ? "0" : item.Id.ToString();
            item                        = _listOrganizationalCellDto.Where(x => x.Name == _employeeMembershipDto.OrganizationalCell).FirstOrDefault();
            ddl_OrganizationalCell.Text = item == null ? "0" : item.Id.ToString();

            Session[SessionVariables.listStructureAndLocationCoefficient] = _listStructureAndLocationDto;
            this.gv_Coefficients.DataSource = _listStructureAndLocationDto;
            this.gv_Coefficients.DataBind();
        }
Ejemplo n.º 4
0
 private void InitData()
 {
     PageMethodsHelper.SetDropDownList(ddl_Section, _listSectionDto);
     PageMethodsHelper.SetDropDownList(ddl_OrganizationalUnit, _listOrganizationalUnitDto);
     PageMethodsHelper.SetDropDownList(ddl_OrganizationalCell, _listOrganizationalCellDto);
 }