• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CellEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CellEventArgs的典型用法代码示例。如果您正苦于以下问题:C# CellEventArgs类的具体用法?C# CellEventArgs怎么用?C# CellEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CellEventArgs类属于命名空间,在下文中一共展示了CellEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CellEventArgsWithNullLocation

        public void CellEventArgsWithNullLocation()
        {
            CellEventArgs args = new CellEventArgs(null);

            Assert.IsTrue(args.Cell == null);
            Assert.IsTrue(args.Loc == Location.Null);
        }
开发者ID:AnthonySteele,项目名称:Hex,代码行数:7,代码来源:CellEventArgsTest.cs


示例2: CellEventArgsPropertiesSet

        public void CellEventArgsPropertiesSet()
        {
            Cell cell = new Cell(new Location(0, 0));
            CellEventArgs args = new CellEventArgs(cell);

            Assert.IsTrue(args.Cell == cell);
            Assert.IsTrue(args.Cell.Location == cell.Location);
            Assert.IsTrue(args.Loc == cell.Location);
        }
开发者ID:AnthonySteele,项目名称:Hex,代码行数:9,代码来源:CellEventArgsTest.cs


示例3: ultraGrid1_CellChange

 private void ultraGrid1_CellChange(object sender, CellEventArgs e)
 {
     if (e.Cell.Column.Key == "CHK")
     {
         if (Convert.ToBoolean(e.Cell.Value)==false)
         {
             e.Cell.Value = "True";
         }
     }
 }
开发者ID:Strongc,项目名称:sencond,代码行数:10,代码来源:DataRenew.cs


示例4: dgv_DanhSach_CellChange

 private void dgv_DanhSach_CellChange(object sender, CellEventArgs e)
 {
     try
     {
         if (e.Cell.Column.Key != "Chon") return;
         var b = bool.Parse(e.Cell.Row.Cells["Chon"].Text);
         e.Cell.Row.Appearance.BackColor = b ? Color.LightCyan : Color.White;
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
开发者ID:khanhnqnuce,项目名称:qlsv-khanhnq,代码行数:13,代码来源:FrmGopKetQua.cs


示例5: listaClickCellButton

 private void listaClickCellButton(object sender, CellEventArgs e)
 {
     if (e.Cell.Column.Key == "DeleteColumn" && e.Cell.Row.ListObject != null)
     {
         if (CommonMessages.DisplayConfirm("Sei sicuro di voler eliminare la attività?") == DialogResult.Yes)
         {
             var attDTO = (AttivitaDTO)e.Cell.Row.ListObject;
             if (attDTO.ID > 0)
             {
                 if (e.Cell.Row.Delete())
                     getPraticaService().DeleteAttivita(attDTO.ID);
             }
         }
     }
 }
开发者ID:gipasoft,项目名称:Sfera,代码行数:15,代码来源:ListaAlertAttivitaUC.cs


示例6: ultraGrid1_AfterCellUpdate

        private void ultraGrid1_AfterCellUpdate(object sender, CellEventArgs e)
        {
            try
            {
                if (e.Cell.Column.Key.Equals("CHECKED"))
                {
                    if (Convert.ToBoolean(e.Cell.Value))
                    {
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_NUMBER"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GP_TOTALCOUNT"].Value;
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT"].Value;
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT_LL"].Value;

                        string strWeight = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value).Trim();

                        if (string.IsNullOrEmpty(strWeight) || strWeight == "0")
                        {
                            this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value;
                        }

                        CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, e.Cell.Row.Index, "FN_GPYS_NUMBER", true);
                    }
                    else
                    {
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_NUMBER"].Value = "";
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = ""; ;
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value = "";
                    }
                }
                else if (e.Cell.Column.Key.Equals("FS_DJH") || e.Cell.Column.Key.Equals("FN_GPYS_WEIGHT"))
                {
                    string strValue = Convert.ToString(e.Cell.Value).Trim();

                    if (!Convert.ToBoolean(ultraGrid1.Rows[e.Cell.Row.Index].Cells["CHECKED"].Value) && !string.IsNullOrEmpty(strValue))
                    {
                        e.Cell.Value = "";
                        return;
                    }
                }
                else if (e.Cell.Column.Key.Equals("FN_GPYS_NUMBER"))
                {
                    string strCount = Convert.ToString(e.Cell.Value).Trim();

                    if (!Convert.ToBoolean(ultraGrid1.Rows[e.Cell.Row.Index].Cells["CHECKED"].Value) && !string.IsNullOrEmpty(strCount))
                    {
                        e.Cell.Value = "";
                        return;
                    }

                    string strCountLG = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GP_TOTALCOUNT"].Value).Trim();

                    if (string.IsNullOrEmpty(strCount))
                    {
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = "";
                        this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value = "";
                        return;
                    }

                    int iCount = 0;
                    int iCountLG = Convert.ToInt16(strCountLG);

                    if (!int.TryParse(strCount, out iCount))
                    {
                        MessageBox.Show("������������������", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        e.Cell.Value = iCountLG.ToString();
                        return;
                    }

                    if (iCount <= 0)
                    {
                        MessageBox.Show("��������������㣡", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        e.Cell.Value = iCountLG.ToString();
                        return;
                    }

                    if (iCount > iCountLG)
                    {
                        MessageBox.Show("���������ܴ�����������", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        e.Cell.Value = iCountLG.ToString();
                        return;
                    }

                    try
                    {
                        string strWeightLG = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT"].Value).Trim();

                        if (!string.IsNullOrEmpty(strWeightLG))
                        {
                            decimal dWeightYS = Convert.ToDecimal(strWeightLG);

                            decimal dWeight = Math.Round(iCount * dWeightYS / iCountLG, 3);

                            this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = dWeight.ToString();
                        }
                    }
                    catch { }

                    try
                    {
                        string strWeightLGLL = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT_LL"].Value).Trim();

//.........这里部分代码省略.........
开发者ID:Strongc,项目名称:sencond,代码行数:101,代码来源:BilletStock.cs


示例7: ultraGrid1_CellChange

 private void ultraGrid1_CellChange(object sender, CellEventArgs e)
 {
     try
     {
         if (e.Cell.Column.Key.Equals("CHECKED") || e.Cell.Column.Key.Equals("FN_GPYS_NUMBER") ||
             e.Cell.Column.Key.Equals("FN_GPYS_WEIGHT") || e.Cell.Column.Key.Equals("FS_DJH"))
         {
             this.ultraGrid1.UpdateData();
         }
     }
     catch { }
 }
开发者ID:Strongc,项目名称:sencond,代码行数:12,代码来源:BilletStock.cs


示例8: listaVersamentiCellChange

 private void listaVersamentiCellChange(object sender, CellEventArgs e)
 {
     if (e.Cell.Row.Band.Index == 0 && e.Cell.Column.Key == "IdConto")
         setSottoContoValueList(e.Cell.Row);
 }
开发者ID:gipasoft,项目名称:Sfera,代码行数:5,代码来源:VersamentiUI.cs


示例9: listaLettureAfterCellUpdate

        private void listaLettureAfterCellUpdate(object sender, CellEventArgs e)
        {
            if (e.Cell.Row.IsDataRow && e.Cell.Row.ListObject is LetturaContatoreDTO)
            {

            }
        }
开发者ID:gipasoft,项目名称:Sfera,代码行数:7,代码来源:LettureContatoriCondominialiUC.cs


示例10: GrillaBancos_ClickCellButton

 private void GrillaBancos_ClickCellButton(object sender, CellEventArgs e)
 {
     ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)e.Cell.Row.Tag;
     switch (e.Cell.Column.Key)
     {
         case colMoneda:
             FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
             Moneda moneda = (Moneda)FrmSeleccionarPanel.GetSelectedEntity(typeof(Moneda), "Moneda");
             Item.Moneda = moneda;
             break;
         default:
             break;
     }
     this.MostrarBanco(e.Cell.Row);
 }
开发者ID:eldersontc,项目名称:soft-erp,代码行数:15,代码来源:FrmSocioNegocio.cs


示例11: myCellClickOnAjax

    private String myCellClickOnAjax(object sender, CellEventArgs e)
{
    return "hello" + e.Cell.StringValue+".row:"+e.Cell.Row+",col:"+e.Cell.Column;
}
开发者ID:assadvirgo,项目名称:Aspose_Cells_NET,代码行数:4,代码来源:ImportOrExportFile.aspx.cs


示例12: ultraGrid1_ClickCellButton

        private void ultraGrid1_ClickCellButton(object sender, CellEventArgs e)
        {
            UltraGridRow ugr = this.ultraGrid1.ActiveRow;
            if (ugr == null) return;

            MessageBox.Show(ugr.Cells["FS_PointCode"].Text.Trim());
        }
开发者ID:Strongc,项目名称:sencond,代码行数:7,代码来源:PointBaseInfo.cs


示例13: listaRateClickCellButton

        private void listaRateClickCellButton(object sender, CellEventArgs e)
        {
            if (e.Cell.Column.Key == "DeleteColumn")
            {
                var authMessage = getRateCondominiService().IsAllowDeleteRata(int.Parse(e.Cell.Row.Cells["ID"].Value.ToString()));
                if (!string.IsNullOrEmpty(authMessage.FatalMessage))
                    CommonMessages.DisplayWarning("Non è possibile eliminare la rata:" + Environment.NewLine + authMessage.FatalMessage);
                else
                {
                    if (!(bool)e.Cell.Row.Cells["Eliminare"].Value)
                    {
                        e.Cell.Row.Cells["AssegnareAEntrante"].Value = false;
                        e.Cell.Row.Cells["Eliminare"].Value = true;
                        e.Cell.Row.Appearance.FontData.Strikeout = Infragistics.Win.DefaultableBoolean.True;
                        foreach (var cell in e.Cell.Row.Cells)
                            cell.Activation = Activation.NoEdit;
                    }
                    else
                    {
                        e.Cell.Row.Cells["Eliminare"].Value = false;
                        e.Cell.Row.Appearance.FontData.Strikeout = Infragistics.Win.DefaultableBoolean.False;

                        e.Cell.Row.Cells["AssegnareAEntrante"].Activation = Activation.AllowEdit;
                    }

                    setRiepilogoImporti();
                }
            }
        }
开发者ID:gipasoft,项目名称:Sfera,代码行数:29,代码来源:RipartizioneSpeseUC.cs


示例14: contiClickCellButton

        private void contiClickCellButton(object sender, CellEventArgs e)
        {
            // ===========================================
            //  Delete Column
            // ===========================================
            if (e.Cell.Column.Key == "DeletedColumn")
            {
                if (e.Cell.Band.Key == "ContoDTO")
                {
                    if (e.Cell.Row.ListObject != null)
                    {
                        var conto = (ContoDTO)e.Cell.Row.ListObject;
                        if (!conto.Deleted)
                        {
                            if (CommonMessages.DisplayConfirm("Sei sicuro di voler cancellare il conto " + conto.DescrizioneCompleta + "?") == DialogResult.Yes)
                            {
                                if (_contiDaAggiornare.Contains(conto))
                                    _contiDaAggiornare.Remove(conto);

                                if (conto.ID > 0)
                                {
                                    var message = getPianoContiService().DeleteConto(conto, _esercizio);
                                    if (!string.IsNullOrEmpty(message))
                                        CommonMessages.DisplayWarning("Il conto non può essere eliminato:" + Environment.NewLine + message);
                                    else
                                    {
                                        e.Cell.Row.Appearance.ForeColor = Color.LightGray;
                                        conto.Deleted = true;
                                    }
                                }
                                else
                                    e.Cell.Row.Delete(false);
                            }
                        }
                        else
                        {
                            if (CommonMessages.DisplayConfirm("Sei sicuro di voler ripristinare il conto " + conto.DescrizioneCompleta + "?") == DialogResult.Yes)
                            {
                                if (_contiDaAggiornare.Contains(conto))
                                    _contiDaAggiornare.Remove(conto);

                                if (conto.ID > 0)
                                {
                                    var message = getPianoContiService().RipristinaConto(conto, _esercizio);
                                    if (!string.IsNullOrEmpty(message))
                                        CommonMessages.DisplayWarning("Si sono verificati degli errori inattesi durante il ripristino del conto:" + Environment.NewLine + message);
                                    else
                                    {
                                        e.Cell.Row.Appearance.ForeColor = Color.Black;
                                        conto.Deleted = false;
                                    }
                                }
                            }
                        }
                    }
                }
                else if (e.Cell.Band.Key == "SottoConti")
                {
                    if (e.Cell.Row.ListObject != null)
                    {
                        var sottoConto = (SottoContoDTO)e.Cell.Row.ListObject;
                        if (e.Cell.Row.Delete())
                        {
                            var conto = (ContoDTO)e.Cell.Row.ParentRow.ListObject;
                            conto.SottoConti.Remove(sottoConto);

                            if (sottoConto.ID > 0)
                                getPianoContiService().DeleteSottoConto(sottoConto, _esercizio);
                        }
                    }
                }
            }

            // ===========================================
            //  Clear Esercizio
            // ===========================================
            if (e.Cell.Column.Key == "ClearEsercizio")
            {
                if (e.Cell.Band.Key == "ContoDTO")
                {
                    if (e.Cell.Row.ListObject != null)
                    {
                        var conto = (ContoDTO)e.Cell.Row.ListObject;
                        conto.IdEsercizio = null;
                        _contiDaAggiornare.Add(conto);
                    }
                }
            }

            // ===========================================
            //  Clear Contatore
            // ===========================================
            if (e.Cell.Column.Key == "ClearContatore")
            {
                if (e.Cell.Band.Key == "ContoDTO")
                {
                    if (e.Cell.Row.ListObject != null)
                    {
                        var conto = (ContoDTO)e.Cell.Row.ListObject;
                        conto.IdContatore = null;
//.........这里部分代码省略.........
开发者ID:gipasoft,项目名称:Sfera,代码行数:101,代码来源:PianoContiUI.cs


示例15: listaContiClickCellButton

 private void listaContiClickCellButton(object sender, CellEventArgs e)
 {
     if (e.Cell.Column.Key == "DeleteColumn")
         e.Cell.Row.Delete();
 }
开发者ID:gipasoft,项目名称:Sfera,代码行数:5,代码来源:BilancioAperturaUC.cs


示例16: ugItemAccion_CellChange

 private void ugItemAccion_CellChange(object sender, CellEventArgs e)
 {
     ItemAccion Item = (ItemAccion)e.Cell.Row.Tag;
     switch (e.Cell.Column.Key)
     {
         case colNombre:
             Item.Nombre = Convert.ToString(e.Cell.Text);
             this.ActualizarCombos();
             break;
         case colClase:
             Item.Clase = Convert.ToString(e.Cell.Text);
             break;
         case colParametro:
             Item.Parametro = Convert.ToString(e.Cell.Text);
             break;
         case colExito:
             Item.Exito = e.Cell.ValueList.GetValue(e.Cell.ValueList.SelectedItemIndex).ToString();
             break;
         case colError:
             Item.Error = e.Cell.ValueList.GetValue(e.Cell.ValueList.SelectedItemIndex).ToString();
             break;
         default:
             break;
     }
     this.MostrarItem(e.Cell.Row);
 }
开发者ID:eldersontc,项目名称:soft-erp,代码行数:26,代码来源:FrmAccion.cs


示例17: ugItemAccion_ClickCellButton

 private void ugItemAccion_ClickCellButton(object sender, CellEventArgs e)
 {
     ItemAccion Item = (ItemAccion)e.Cell.Row.Tag;
     switch (e.Cell.Column.Key)
     {
         case colEnsamblado:
             FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
             Item.Ensamblado = (Ensamblado)FrmSeleccionar.GetSelectedEntity(typeof(Ensamblado), "Ensamblado");
             break;
         default:
             break;
     }
     this.MostrarItem(e.Cell.Row);
 }
开发者ID:eldersontc,项目名称:soft-erp,代码行数:14,代码来源:FrmAccion.cs


示例18: listaRateAfterCellUpdate

 private void listaRateAfterCellUpdate(object sender, CellEventArgs e)
 {
     try
     {
         if (e.Cell.Column.Key == "AssegnareAEntrante" || e.Cell.Column.Key == "AssegnareAEntrante" || e.Cell.Column.Key == "Importo")
         {
             if (e.Cell.Column.Key == "AssegnareAEntrante" || e.Cell.Column.Key == "AssegnareAEntrante")
             {
                 listaRate.UpdateData();
                 listaRate.PerformAction(UltraGridAction.ExitEditMode);
             }
             setRiepilogoImporti();
         }
     }
     catch (Exception ex)
     {
         
         _log.Error("Errore inaspettato nella lettura del riepilogo degli importi - " + Utility.GetMethodDescription(), ex);
     }
 }
开发者ID:gipasoft,项目名称:Sfera,代码行数:20,代码来源:RipartizioneSpeseUC.cs


示例19: dgv_DanhSach_CellChange

        private void dgv_DanhSach_CellChange(object sender, CellEventArgs e)
        {
            if (e.Cell.Column.Key != "Chon") return;
            var b = bool.Parse(e.Cell.Row.Cells["Chon"].Text);
            if (b)
            {
                _tongsucchua = _tongsucchua + int.Parse(e.Cell.Row.Cells["SucChua"].Text);
                e.Cell.Row.Appearance.BackColor = Color.LightCyan;
            }
            else
            {
                e.Cell.Row.Appearance.BackColor = Color.White;
                _tongsucchua = _tongsucchua - int.Parse(e.Cell.Row.Cells["SucChua"].Text);
            }

            lbtong.Text = @"Tổng sức chứa: " + _tongsucchua + @" sinh viên.";
        }
开发者ID:khanhnqnuce,项目名称:qlsv-khanhnq,代码行数:17,代码来源:FrmChonPhongThi.cs


示例20: GrillaDirecciones_CellChange

 private void GrillaDirecciones_CellChange(object sender, CellEventArgs e)
 {
     ItemSocioNegocioDireccion Item = (ItemSocioNegocioDireccion)e.Cell.Row.Tag;
     switch (e.Cell.Column.Key)
     {
         case colDireccion:
             Item.Direccion = Convert.ToString(e.Cell.Text);
             break;
         case colDirEntrega:
             Item.EsDireccionEntrega = Convert.ToBoolean(e.Cell.Text);
             break;
         case colDirFactura:
             Item.EsDireccionFacturacion = Convert.ToBoolean(e.Cell.Text);
             break;
         default:
             break;
     }
     this.MostrarDireccion(e.Cell.Row);
 }
开发者ID:eldersontc,项目名称:soft-erp,代码行数:19,代码来源:FrmSocioNegocio.cs



注:本文中的CellEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CellInfo类代码示例发布时间:2022-05-24
下一篇:
C# CellContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap