当前位置: 首页>>代码示例>>C#>>正文


C# CellEventArgs类代码示例

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


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


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