Example #1
0
        private void btnModAssignUserInfo_Click(object sender, RoutedEventArgs e)
        {
            int ind = dgServicesUserInfo.SelectedIndex;

            if (ind == -1)
            {
                CustomMessageBox.Show(Strings.MsgSeleccionarTrabajo);
            }
            else
            {
                DataRowView tmp  = (DataRowView)dgServicesUserInfo.SelectedItem;
                DataRow     drt  = tmp.Row;
                string      tipo = drt[0].ToString();
                if (tipo.Equals(Strings.TrabajoSolo))
                {
                    int          id  = int.Parse(drt[1].ToString());
                    NewModAssign nma = new NewModAssign(id, u.Iduser);
                    nma.ShowDialog();
                    dgServicesUserInfo.ItemsSource = us.mostrarDatos(u.Iduser).DefaultView;
                }
                else
                {
                    CustomMessageBox.Show(Strings.MsgModificarServiciosPrincipal);
                }
            }
        }
Example #2
0
        private void btnAddAssignUserInfo_Click(object sender, RoutedEventArgs e)
        {
            NewModAssign nma = new NewModAssign(0, u.Iduser);

            nma.ShowDialog();
            dgServicesUserInfo.ItemsSource = us.mostrarDatos(u.Iduser).DefaultView;
        }
Example #3
0
 private void btnAssignUser_Click(object sender, RoutedEventArgs e)
 {
     if (idusertmp == 0)
     {
         CustomMessageBox.Show(Strings.MsgSeleccionarUsuario);
     }
     else
     {
         NewModAssign nma = new NewModAssign(0, idusertmp);
         nma.ShowDialog();
         updateDGUsers();
     }
 }
Example #4
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Close();
            int ind = dgSelUser.SelectedIndex;

            if (ind == -1)
            {
                CustomMessageBox.Show(Strings.MsgSeleccionarUsuario);
            }
            else
            {
                DataRowView  tmp = (DataRowView)dgSelUser.SelectedItem;
                DataRow      drt = tmp.Row;
                int          id  = int.Parse(drt[0].ToString());
                NewModAssign nma = new NewModAssign(0, id);
                nma.ShowDialog();
            }
        }
Example #5
0
        private void btnModifyAssignments_Click(object sender, RoutedEventArgs e)
        {
            DataRowView tmp = (DataRowView)dgAssignments.SelectedItem;

            if (tmp != null)
            {
                DataRow      drt = tmp.Row;
                int          id  = int.Parse(drt[0].ToString());
                DataRow      dr  = a.singleAssignment(id);
                NewModAssign nma = new NewModAssign(id, int.Parse(dr["refuser"].ToString()));
                nma.ShowDialog();
                updateDGAssignments();
            }
            else
            {
                CustomMessageBox.Show(Strings.MsgSeleccionarTrabajo);
            }
        }