Exemplo n.º 1
0
 /// <summary>
 /// Fills selected changed employee to datagrid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void drdHeadEmployeeList_SelectionChanged(object sender,
                                                     Infragistics.Web.UI.ListControls.DropDownSelectionChangedEventArgs e)
 {
     try
     {
         String selectedEmployee = drdHeadEmployeeList.SelectedItem.Text;
         atdrCtrl = GetControl();
         DataTable dt = atdrCtrl.SelectEmployeeName(selectedEmployee);
         DgvTempDepteHeadSearchDetails.DataSource = dt;
         DgvTempDepteHeadSearchDetails.DataBind();
     }
     catch (Exception ex)
     {
         Logger.WriteErrorLog(ex);
     }
 }
Exemplo n.º 2
0
        //protected void DgvTempDepteHeadSearchDetails_RowSelectionChanged(object sender,
        //    Infragistics.Web.UI.GridControls.SelectedRowEventArgs e)
        //{
        //    assign_employeeID = e.CurrentSelectedRows[0].Attributes["EmployeeID"];
        //}

        //protected void DgvCurrentAuthorizedPerson_RowSelectionChanged(object sender,
        //    Infragistics.Web.UI.GridControls.SelectedRowEventArgs e)
        //{
        //    remove_employeeID = e.CurrentSelectedRows[0].Attributes["EmployeeID"];
        //}

        protected void btnEmployee_Click(object sender, EventArgs e)
        {
            try
            {
                if (Convert.ToString(drdHeadEmployeeList.SelectedValue) != "")
                {
                    DgvTempDepteHeadSearchDetails.DataSource = Util.GetEmployeeDetails(drdHeadEmployeeList.CurrentValue);
                    DgvTempDepteHeadSearchDetails.DataBind();
                }
                else
                {
                    lblStatusMessage.Text = "Choose one employee to assign.";
                }
            }
            catch (Exception ex)
            {
                //print something
            }
        }