Пример #1
0
        public void TestMethodRaiseEvent()
        {
            //Arrange
            using (JMRadForm form = new JMRadForm())
            {
                List <Order> orders = form.GetData();
                form.Grid.DataSource = orders;
                form.Grid.ClearSelection();
                form.Grid.MultiSelect = false;
                form.Grid.CurrentRow  = null;
                form.Grid.LoadElementTree();

                string actual   = null;
                string expected = form.Grid.Rows[orders.Count / 2].Cells["Id"].Value + "";


                var executor = Mock.Create <RadGridView>();
                executor.CurrentRowChanged += delegate(object sender, CurrentRowChangedEventArgs args)
                {
                    if (args.CurrentRow != null && args.CurrentRow.DataBoundItem == orders[orders.Count / 2])
                    {
                        actual = args.CurrentRow.Cells["Id"].Value + "";
                    }
                };

                // Act

                CurrentRowChangedEventArgs eventArguments = new CurrentRowChangedEventArgs(null, form.Grid.Rows[orders.Count / 2]);
                Mock.Raise(() => executor.CurrentRowChanged += null, eventArguments);

                // Assert
                Assert.AreEqual(expected, actual);
            }
        }
        //public DataRow FindRowByKey(string KeyField, string KeyValue) => Table.Select($"{KeyField}={KeyValue}").FirstOrDefault();

        public string GetValue(CurrentRowChangedEventArgs e, string FieldName)
        {
            string s = string.Empty;

            try { s = e.CurrentRow.Cells[Standard.GetGridColumnName(FieldName)].Value.ToString(); } catch { s = string.Empty; }
            return(s);
        }
Пример #3
0
        private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            string text;

            if (e.CurrentRow == null)
            {
                if (e.OldRow != null)
                {
                    text = string.Format("   CurrentRowChanged, old Id = {0}, current row is non-data-bound", e.OldRow.Cells["Id"].Value);
                }
                else
                {
                    text = "   CurrentRowChanged, old and current rows are non-data-bound";
                }
            }
            else
            {
                if (e.OldRow != null)
                {
                    text = string.Format("   CurrentRowChanged, old Id = {0}, current Id = {1}", e.OldRow.Cells["Id"].Value, e.CurrentRow.Cells["Id"].Value);
                }
                else
                {
                    text = string.Format("   CurrentRowChanged, current Id = {0}", e.CurrentRow.Cells["Id"].Value);
                }
            }

            AddEventRoot("CurrentRowChanged");
            AddTextToListBox(text);
        }
Пример #4
0
 private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (e.CurrentRow != null)
     {
         initialValues = new Dictionary <int, object>();
     }
 }
Пример #5
0
        private void gridView_GradeDetail_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            var view = sender as RadGridView;
            int idx  = e.CurrentRow.Index;

            this.tbSetNo_GradeDetail.Text = view.Rows[idx].Cells[0].Value.ToString();
            this.tbAimTemp.Text           = view.Rows[idx].Cells[1].Value.ToString();

            this.tbTOPmax_1.Text = view.Rows[idx].Cells[2].Value.ToString();
            this.tbTOPmin_1.Text = view.Rows[idx].Cells[2].Value.ToString();
            this.tbBOTmax_1.Text = view.Rows[idx].Cells[3].Value.ToString();
            this.tbBOTmin_1.Text = view.Rows[idx].Cells[4].Value.ToString();

            this.tbTOPmax_2.Text = view.Rows[idx].Cells[5].Value.ToString();
            this.tbTOPmin_2.Text = view.Rows[idx].Cells[6].Value.ToString();
            this.tbBOTmax_2.Text = view.Rows[idx].Cells[7].Value.ToString();
            this.tbBOTmin_2.Text = view.Rows[idx].Cells[8].Value.ToString();

            this.tbTOPmax_3.Text = view.Rows[idx].Cells[9].Value.ToString();
            this.tbTOPmin_3.Text = view.Rows[idx].Cells[10].Value.ToString();
            this.tbBOTmax_3.Text = view.Rows[idx].Cells[11].Value.ToString();
            this.tbBOTmin_3.Text = view.Rows[idx].Cells[12].Value.ToString();

            this.tbTOPmax_4.Text = view.Rows[idx].Cells[13].Value.ToString();
            this.tbTOPmin_4.Text = view.Rows[idx].Cells[14].Value.ToString();
            this.tbBOTmax_4.Text = view.Rows[idx].Cells[15].Value.ToString();
            this.tbBOTmin_4.Text = view.Rows[idx].Cells[16].Value.ToString();

            this.tbTOPmax_5.Text = view.Rows[idx].Cells[17].Value.ToString();
            this.tbTOPmin_5.Text = view.Rows[idx].Cells[18].Value.ToString();
            this.tbBOTmax_5.Text = view.Rows[idx].Cells[19].Value.ToString();
            this.tbBOTmin_5.Text = view.Rows[idx].Cells[20].Value.ToString();

            this.tbTOPmax_6.Text = view.Rows[idx].Cells[21].Value.ToString();
            this.tbTOPmin_6.Text = view.Rows[idx].Cells[22].Value.ToString();
            this.tbBOTmax_6.Text = view.Rows[idx].Cells[23].Value.ToString();
            this.tbBOTmin_6.Text = view.Rows[idx].Cells[24].Value.ToString();

            this.tbTOPmax_7.Text = view.Rows[idx].Cells[25].Value.ToString();
            this.tbTOPmin_7.Text = view.Rows[idx].Cells[26].Value.ToString();
            this.tbBOTmax_7.Text = view.Rows[idx].Cells[27].Value.ToString();
            this.tbBOTmin_7.Text = view.Rows[idx].Cells[28].Value.ToString();

            this.tbTOPmax_8.Text = view.Rows[idx].Cells[29].Value.ToString();
            this.tbTOPmin_8.Text = view.Rows[idx].Cells[30].Value.ToString();
            this.tbBOTmax_8.Text = view.Rows[idx].Cells[31].Value.ToString();
            this.tbBOTmin_8.Text = view.Rows[idx].Cells[32].Value.ToString();

            this.tbTOPmax_9.Text = view.Rows[idx].Cells[33].Value.ToString();
            this.tbTOPmin_9.Text = view.Rows[idx].Cells[34].Value.ToString();
            this.tbBOTmax_9.Text = view.Rows[idx].Cells[35].Value.ToString();
            this.tbBOTmin_9.Text = view.Rows[idx].Cells[36].Value.ToString();

            this.tbTOPmax_10.Text = view.Rows[idx].Cells[37].Value.ToString();
            this.tbTOPmin_10.Text = view.Rows[idx].Cells[38].Value.ToString();
            this.tbBOTmax_10.Text = view.Rows[idx].Cells[39].Value.ToString();
            this.tbBOTmin_10.Text = view.Rows[idx].Cells[40].Value.ToString();
        }
Пример #6
0
        private void gridView_Grade_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            var view = sender as RadGridView;
            int idx  = e.CurrentRow.Index;

            this.tbGrade.Text   = view.Rows[idx].Cells[0].Value.ToString();
            this.tbSetNo.Text   = view.Rows[e.CurrentRow.Index].Cells[1].Value.ToString();
            this.tbDetatil.Text = view.Rows[e.CurrentRow.Index].Cells[2].Value.ToString();
        }
Пример #7
0
 private void radGridView2_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     using (var client = new ServiceReferenceDocument.DocumentsClient("Binding_Documents"))
     {
         var doc = (e.CurrentRow.DataBoundItem as ServiceReferenceDocument.Document);
         doc = client.GetDocumentInServer(doc.IdDocument);
         gvServers.DataSource = doc.DocumentInServer;
     }
 }
Пример #8
0
 private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (!(e.CurrentRow is GridViewGroupRowInfo))
     {
         if (e.CurrentRow.HasChildRows())
         {
             lblSelection.Text = "No. Trans : " + e.CurrentRow.Cells["NoSJ"].Value.ToString();
             lblLogID.Text     = e.CurrentRow.Cells["LogID"].Value.ToString();
         }
     }
 }
Пример #9
0
 private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (e.CurrentRow.Cells["pinjamanid"].Value != null)
     {
         rinciangajiBindingSource.Filter = "tipeid = 5 and templateid = " + e.CurrentRow.Cells["pinjamanid"].Value.ToString();
     }
     else
     {
         rinciangajiBindingSource.Filter = "tipeid = 5 and templateid = -1";
     }
 }
Пример #10
0
 private void grdData_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     try
     {
         if (grdData.CurrentRow.Index < 0) return;
         lblID.Text = grdData.CurrentRow.Cells["UnitOfMeasurementId"].Value.ToString();
         lblName.Text = grdData.CurrentRow.Cells["UnitName"].Value.ToString();
         lblRemarks.Text = grdData.CurrentRow.Cells["Description"].Value.ToString();
     }
     catch
     {}
 }
Пример #11
0
 private void servers_MultiColumnComboBox_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (servers_MultiColumnComboBox.SelectedItem is GridViewDataRowInfo info)
     {
         _selectedServer = ((ServerComboBoxItem)info.DataBoundItem).Server;
     }
     else
     {
         _selectedServer = null;
     }
     OnSelectionChanged();
 }
Пример #12
0
 private void grdPayment_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (dtPayment.GetChanges() != null)
     {
         string query = "update tbl_payment set ";
         query += "pay_date = '" + (e.OldRow.Cells["pay_date"].Value) + "',";
         query += "pay_balance = " + (e.OldRow.Cells["pay_balance"].Value);
         query += " where Cntr_No = " + (e.OldRow.Cells["tbl_payment.Cntr_No"].Value);
         dataAccess.ExecuteAccess(query);
         dtPayment.AcceptChanges();
         btnRefreshPayment_Click(null, null);
     }
 }
Пример #13
0
 private void grdCust_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (dtCust.GetChanges() != null)
     {
         string query = "update tbl_cust set ";
         query += "fname = '" + (e.OldRow.Cells["fname"].Value) + "',";
         query += "lname = '" + (e.OldRow.Cells["lname"].Value) + "',";
         query += "addr = '" + (e.OldRow.Cells["addr"].Value);
         query += "' where Cntr_No = " + (e.OldRow.Cells["Cntr_No"].Value);
         dataAccess.ExecuteAccess(query);
         dtCust.AcceptChanges();
     }
 }
 private void dgv_01_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     //if (dgv_01.CurrentRow.Cells["total_count"].Value.ToString() == dgv_01.CurrentRow.Cells["current_count"].Value.ToString() && dgv_01.CurrentRow.Cells["set_count"].Value.ToString() == "0")
     //{
     //    but_edit.Enabled = true;
     //    but_remove.Enabled = true;
     //}
     //else
     //{
     //    but_edit.Enabled = false;
     //    but_remove.Enabled = false;
     //}
 }
Пример #15
0
 private void gvDatos_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     try {
         if (gvDatos.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
         {
             txtId.Text = e.CurrentRow.Cells["Id"].Value.ToString();
             cboColores.SelectedValue = int.Parse(e.CurrentRow.Cells["IdColor"].Value.ToString());
             txtClave.Text            = e.CurrentRow.Cells["Clave"].Value.ToString();
             cboTipo.Text             = e.CurrentRow.Cells["Tipo"].Value.ToString();
             chkEstatus.Checked       = bool.Parse(e.CurrentRow.Cells["Estatus"].Value.ToString());
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
Пример #16
0
        private void mailsGridView_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            if (e.CurrentRow is GridViewDataRowInfo)
            {
                Discard();

                e.CurrentRow.Cells["Status"].Value = EmailStatus.Read;

                mailRichTextEditor.Document = (RadDocument)e.CurrentRow.Cells["Content"].Value;
                fromLabel.Text  = e.CurrentRow.Cells["Sender"].Value.ToString();
                toLabel.Text    = e.CurrentRow.Cells["Recipient"].Value.ToString();
                topicLabel.Text = e.CurrentRow.Cells["Subject"].Value.ToString();
                dateLabel.Text  = e.CurrentRow.Cells["Received"].Value.ToString();
            }
        }
Пример #17
0
 private void radGridView4_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     //don't allow edit when already printed
     if (!(e.CurrentRow is GridViewGroupRowInfo))
     {
         if (e.CurrentRow.Cells["printed"].Value.ToString().ToLower() == "false")
         {
             btnPrintKas.Enabled = true;
         }
         else
         {
             btnPrintKas.Enabled = delete_;
         }
     }
 }
Пример #18
0
 private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (!(e.CurrentRow is GridViewGroupRowInfo))
     {
         //if (e.CurrentRow.HasChildViews)
         //{
         if (e.CurrentRow.Cells["NoSJ"] != null)
         {
             lblSelection.Text = "Laporan : " + e.CurrentRow.Cells["NoSJ"].Value.ToString();
             lblLogID.Text     = e.CurrentRow.Cells["LogID"].Value.ToString();
             lblSales.Text     = e.CurrentRow.Cells["SalesShort"].Value.ToString();
         }
         //}
     }
 }
Пример #19
0
        private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            if (!(e.CurrentRow is GridViewGroupRowInfo))
            {
                if (e.CurrentRow.HasChildRows())
                {
                    lblSelection.Text = "Surat Jalan yang Terpilih : " + e.CurrentRow.Cells["NoSJ"].Value.ToString();
                    lblLogID.Text     = e.CurrentRow.Cells["LogID"].Value.ToString();

                    //decide to allow user delete edit or batal sj
                    if (DateTime.Parse(e.CurrentRow.Cells["created"].Value.ToString()).Date == DateTime.Now.Date)
                    {
                        if (bool.Parse(e.CurrentRow.Cells["Printed"].Value.ToString()))
                        {
                            btnBatal.Enabled = delete_;
                            btnEdit.Enabled  = delete_;
                            btnPrint.Enabled = delete_;
                        }
                        else
                        {
                            btnEdit.Enabled  = (add_ || edit_ || delete_);
                            btnBatal.Enabled = (add_ || edit_ || delete_);
                            btnPrint.Enabled = (add_ || edit_ || delete_);
                        }
                    }
                    else
                    {
                        btnEdit.Enabled  = (edit_ || delete_);
                        btnBatal.Enabled = delete_;
                        if (bool.Parse(e.CurrentRow.Cells["Printed"].Value.ToString()))
                        {
                            btnPrint.Enabled = delete_;
                        }
                        else
                        {
                            btnPrint.Enabled = add_ || edit_ || delete_;
                        }
                    }
                }
            }
            else
            {
                btnBatal.Enabled = false;
                btnEdit.Enabled  = false;
                btnPrint.Enabled = false;
            }
        }
        private void grdData_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            try
            {
                if (grdData.CurrentRow.Index < 0)
                {
                    return;
                }
                lblID.Text   = grdData.CurrentRow.Cells["WareHouseId"].Value.ToString();
                lblName.Text = grdData.CurrentRow.Cells["WareHouseName"].Value.ToString();
                lblType.Text = grdData.CurrentRow.Cells["WareHouseType"].Value.ToString();

                lblRemarks.Text = grdData.CurrentRow.Cells["Description"].Value.ToString();
            }
            catch
            {}
        }
Пример #21
0
 private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (!(e.CurrentRow is GridViewGroupRowInfo))
     {
         if (e.CurrentRow.Cells["LogpelID"].Value != null)
         {
             logotherBindingSource1.Filter = "logpelid =" + e.CurrentRow.Cells["LogpelID"].Value.ToString();
         }
         else
         {
             logotherBindingSource1.Filter = "logpelid = -2";
         }
     }
     else
     {
         logotherBindingSource1.Filter = "logpelid = -2";
     }
 }
Пример #22
0
 private void grdIndicator_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (dtIndicator.GetChanges() != null)
     {
         string query = "update tbl_indicator set ";
         query += "Max_Use = " + Convert.ToDouble(e.OldRow.Cells["Max_Use"].Value) + ",";
         query += "Unit_Price = " + Convert.ToDouble(e.OldRow.Cells["Unit_Price"].Value);
         query += " where Max_Use = " + editingIndicatorValue_MaxUse.ToString();
         query += " and Unit_Price = " + editingIndicatorValue_UnitPrice.ToString();
         dataAccess.ExecuteAccess(query);
         editingIndicatorValue_MaxUse = editingIndicatorValue_UnitPrice = -1;
         dtSelectedTermUsage.AcceptChanges();
     }
     else
     {
         editingIndicatorValue_MaxUse = editingIndicatorValue_UnitPrice = -1;
     }
 }
Пример #23
0
        private void _searchGrid_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            var data = _repo.getById(_tableName, e.CurrentRow.Cells["Id"].Value.ToString());

            if (data != null)
            {
                radGridView1.Rows.Clear();
                GridViewDataRowInfo rowInfo = new GridViewDataRowInfo(this.radGridView1.MasterView);
                foreach (var item in radGridView1.Columns)
                {
                    Type a = item.DataType;
                    rowInfo.Cells[item.Name].Value = data.FieldValue <object>(item.Name);
                }
                radGridView1.Rows.Add(rowInfo);
                radGridView1.BringToFront();
                _searchGrid.Hide();
            }
        }
Пример #24
0
 private void grdData_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     try
     {
         if (grdData.CurrentRow.Index < 0)
         {
             return;
         }
         lblID.Text   = grdData.CurrentRow.Cells["ProductionMaterialId"].Value.ToString();
         _unitId      = (int)grdData.CurrentRow.Cells["UnitOfMeasurementId"].Value;
         lblName.Text = grdData.CurrentRow.Cells["MaterialName"].Value.ToString();
         lblUnit.Text = grdData.CurrentRow.Cells["UnitName"].Value.ToString();
         lblType.Text = grdData.CurrentRow.Cells["MaterialType"].Value.ToString();
         lblDesc.Text = grdData.CurrentRow.Cells["Description"].Value.ToString();
     }
     catch
     {}
 }
Пример #25
0
        private void gvDictamen_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            try {
                if (gvDictamen.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
                {
                    txtIdNuevoP.Text     = e.CurrentRow.Cells["Id"].Value.ToString();
                    txtJustif.Text       = e.CurrentRow.Cells["Justificacion"].Value.ToString();
                    lblNombre.Text       = e.CurrentRow.Cells["Nombre"].Value.ToString();
                    txtIndicad.Text      = e.CurrentRow.Cells["Indicadores"].Value.ToString();
                    lblSueldo.Text       = (e.CurrentRow.Cells["Sueldo"].Value.ToString());
                    lblDepto.Text        = (e.CurrentRow.Cells["DEP_Nombre"].Value.ToString());
                    lblEntidad.Text      = (e.CurrentRow.Cells["ENT_Nombre"].Value.ToString());
                    lblOcupantes.Text    = (e.CurrentRow.Cells["Ocupantes"].Value.ToString());
                    txtResultados.Text   = (e.CurrentRow.Cells["Resultados"].Value.ToString());
                    txtObjetivos.Text    = (e.CurrentRow.Cells["Objetivos"].Value.ToString());
                    txtPrestaciones.Text = e.CurrentRow.Cells["Prestaciones"].Value.ToString();
                    txtNecesidades.Text  = (e.CurrentRow.Cells["Necesidades"].Value.ToString());
                    txtPuestosCargo.Text = (e.CurrentRow.Cells["PuestosCargo"].Value.ToString());
                    txtOpinionesDG.Text  = (e.CurrentRow.Cells["OpinionesDG"].Value.ToString());
                    txtOpinionesCH.Text  = (e.CurrentRow.Cells["OpinionesCH"].Value.ToString());
                    string estatus = e.CurrentRow.Cells["Estado"].Value.ToString();

                    if (estatus == "REVISADO")
                    {
                        rdbRevisiones.IsChecked = true;
                    }
                    else if (estatus == "ACEPTADO")
                    {
                        rdbAceptado.IsChecked = true;
                    }
                    else if (estatus == "RECHAZADO")
                    {
                        rdbRechazado.IsChecked = true;
                    }
                    else
                    {
                        rdbRevisiones.IsChecked   = rdbRechazado.IsChecked =
                            rdbAceptado.IsChecked = false;
                    }
                }
            } catch (Exception ex) {
                RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
            }
        }
Пример #26
0
 private void grdUsage_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     if (dtSelectedTermUsage.GetChanges() != null)
     {
         string query = "update tbl_usage set ";
         query += "Subscription = " + Convert.ToDouble(e.OldRow.Cells["Subscription"].Value) + ",";
         query += "Garbage = " + Convert.ToDouble(e.OldRow.Cells["Garbage"].Value) + ",";
         query += "Wtr_Price = " + Convert.ToDouble(e.OldRow.Cells["Wtr_Price"].Value) + ",";
         query += "Partnership = " + Convert.ToDouble(e.OldRow.Cells["Partnership"].Value) + ",";
         query += "Discount = " + Convert.ToDouble(e.OldRow.Cells["Discount"].Value) + ",";
         query += "Renovation = " + Convert.ToDouble(e.OldRow.Cells["Renovation"].Value) + ",";
         query += "Communion = " + Convert.ToDouble(e.OldRow.Cells["Communion"].Value) + ",";
         query += "Others = " + Convert.ToDouble(e.OldRow.Cells["Others"].Value) + ",";
         query += "Cntr_Liter = " + Convert.ToDouble(e.OldRow.Cells["Cntr_Liter"].Value);
         query += " where Term_No = " + Convert.ToDouble(e.OldRow.Cells["Term_No"].Value);
         query += " and Cntr_No = " + Convert.ToDouble(e.OldRow.Cells["tbl_usage.Cntr_No"].Value);
         dataAccess.ExecuteAccess(query);
         dtSelectedTermUsage.AcceptChanges();
     }
 }
Пример #27
0
 private void grdData_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     try
     {
         if (grdData.CurrentRow.Index < 0)
         {
             return;
         }
         lblID.Text       = grdData.CurrentRow.Cells["DealerId"].Value.ToString();
         _regionId        = (int)grdData.CurrentRow.Cells["RegionId"].Value;
         lblName.Text     = grdData.CurrentRow.Cells["DealerName"].Value.ToString();
         lblAddress.Text  = grdData.CurrentRow.Cells["DealerAddress"].Value.ToString();
         lblPhone.Text    = grdData.CurrentRow.Cells["PhoneNo"].Value.ToString();
         lblMobile.Text   = grdData.CurrentRow.Cells["MobileNo"].Value.ToString();
         lblEmail.Text    = grdData.CurrentRow.Cells["Email"].Value.ToString();
         lblRegion.Text   = grdData.CurrentRow.Cells["RegionName"].Value.ToString();
         lblIncharge.Text = grdData.CurrentRow.Cells["DelearIncharge"].Value.ToString();
     }
     catch
     {}
 }
        private void gvDatos_CurrentRowChanged_1(object sender, CurrentRowChangedEventArgs e)
        {
            try {
                LimpiarCampos();

                if (gvDatos.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
                {
                    txtJustif.Text   = e.CurrentRow.Cells["Justificacion"].Value.ToString();
                    txtIndicad.Text  = e.CurrentRow.Cells["Indicadores"].Value.ToString();
                    lblSueldo.Text   = "$" + (e.CurrentRow.Cells["Sueldo"].Value.ToString());
                    lblDepto.Text    = (e.CurrentRow.Cells["DEP_Nombre"].Value.ToString());
                    lblEntidad.Text  = (e.CurrentRow.Cells["ENT_Nombre"].Value.ToString());
                    lblContrato.Text = (e.CurrentRow.Cells["TCO_Nombre"].Value.ToString());
                    lblPuesto.Text   = (e.CurrentRow.Cells["PUE_Nombre"].Value.ToString());
                    txtIdSu.Text     = (e.CurrentRow.Cells["Id"].Value.ToString());
                    txtDictamen.Text = (e.CurrentRow.Cells["Dictamen"].Value.ToString());
                    string estatus = e.CurrentRow.Cells["Estado"].Value.ToString();

                    if (estatus == "REVISADO")
                    {
                        rdbRevisiones.IsChecked = true;
                    }
                    else if (estatus == "ACEPTADO")
                    {
                        rdbAceptado.IsChecked = true;
                    }
                    else if (estatus == "RECHAZADO")
                    {
                        rdbRechazado.IsChecked = true;
                    }
                    else
                    {
                        rdbRevisiones.IsChecked   = rdbRechazado.IsChecked =
                            rdbAceptado.IsChecked = false;
                    }
                }
            } catch (Exception ex) {
                RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
            }
        }
Пример #29
0
 private void grdData_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     try
     {
         if (grdData.CurrentRow.Index < 0) return;
         lblID.Text = grdData.CurrentRow.Cells["BrandId"].Value.ToString();
         lblName.Text = grdData.CurrentRow.Cells["BrandName"].Value.ToString();
         lblRemarks.Text = grdData.CurrentRow.Cells["Description"].Value.ToString();
     }
     catch
     {
     }
 }
Пример #30
0
        void radGridViewEditDoc_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            bool ret = true;
            if (ret && (radGridViewEditDoc.Rows.Count < 1))
            {
                ret = false;
                return;
            }

            if (ret && (e.CurrentRow.Index < 0))
            {
                ret = false;
                return;
            }

            this.RefreshLine_DS();
        }
Пример #31
0
 private void gridviews_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     foreach (var g in gridviews)
     {
         g.CurrentRow = e.CurrentRow;
         foreach (var row in g.Rows)
         {
             try
             {
                 row.IsSelected = false;
                 if (row.Index == e.CurrentRow.Index)
                 {
                     row.IsSelected = true;
                 }
             }
             catch { }
         }
     }
 }
        private void grdData_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
        {
            try
            {
                if (grdData.CurrentRow.Index < 0) return;
                lblID.Text = grdData.CurrentRow.Cells["ProductionMaterialId"].Value.ToString();
                _unitId = (int)grdData.CurrentRow.Cells["UnitOfMeasurementId"].Value;
                lblName.Text = grdData.CurrentRow.Cells["MaterialName"].Value.ToString();
                lblUnit.Text = grdData.CurrentRow.Cells["UnitName"].Value.ToString();
                lblType.Text = grdData.CurrentRow.Cells["MaterialType"].Value.ToString();
                lblDesc.Text = grdData.CurrentRow.Cells["Description"].Value.ToString();

            }
            catch
            {}
        }
Пример #33
0
 private void grdData_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     try
     {
         if (grdData.CurrentRow.Index < 0) return;
         lblID.Text = grdData.CurrentRow.Cells["DealerId"].Value.ToString();
         _regionId = (int)grdData.CurrentRow.Cells["RegionId"].Value;
         lblName.Text = grdData.CurrentRow.Cells["DealerName"].Value.ToString();
         lblAddress.Text = grdData.CurrentRow.Cells["DealerAddress"].Value.ToString();
         lblPhone.Text = grdData.CurrentRow.Cells["PhoneNo"].Value.ToString();
         lblMobile.Text = grdData.CurrentRow.Cells["MobileNo"].Value.ToString();
         lblEmail.Text = grdData.CurrentRow.Cells["Email"].Value.ToString();
         lblRegion.Text = grdData.CurrentRow.Cells["RegionName"].Value.ToString();
         lblIncharge.Text = grdData.CurrentRow.Cells["DelearIncharge"].Value.ToString();
     }
     catch
     {}
 }
Пример #34
0
 private void RgvProducts_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     UpdatePanel(RgvProducts.CurrentRow);
     btnModify.Enabled = true;
 }
Пример #35
0
 private void masterGridView_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
 }
Пример #36
0
 void rowChanged_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)
 {
     ReadOnlyControls(true);
 }