コード例 #1
0
    private void LoadEmployees()
    {
        //if (!string.IsNullOrEmpty(DropDownListDepartment.SelectedValue))// Converter para > JS
        // {//
        GridViewExtentionLines.DataSource = employee.LoadEmployee("Ramais", "Empresa", DropDownListCompany.SelectedItem.Value, "Departamento", DropDownListDepartment.SelectedItem.Value);
        GridViewExtentionLines.DataBind();

        //ButtonAdd.Visible = true;//Converter para > JS

        //}//Converter para > JS
        // else//Converter para > JS
        //{//Converter para > JS
        //    GridViewExtentionLines.DataSource = null;  //ButtonAdd.Visible = false;//Converter para > JS
        //}GridViewExtentionLines.DataBind();//Converter para > JS
    }
コード例 #2
0
    private void LoadDDLDepartment()
    {
        listDepartment = dept.LoadDepartament(_x, "Empresa", DropDownListCompany.SelectedItem.Value, "Ramais");//new

        if (listDepartment != null && listDepartment.Count > 0)
        {
            listDepartment.Insert(0, new Department()
            {
                Name = ""
            });                                                      //50000 value since 0 is an ID used in XML //Id = 50000,

            DropDownListDepartment.Visible    = true;
            DropDownListDepartment.DataSource = listDepartment;
            DropDownListDepartment.DataBind();
        }
        else
        {
            DropDownListDepartment.Visible = false;
        }

        //ButtonAdd.Visible = false;//Js
        GridViewExtentionLines.DataSource = null;
        GridViewExtentionLines.DataBind();
    }