예제 #1
0
        private void aisinoDataGrid1_DataGridCellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            switch (this.aisinoDataGrid1.get_Columns()[e.ColumnIndex].Name)
            {
            case "KPZT":
                e.Value = ShowString.ShowKPZT(e.Value.ToString());
                break;

            case "DJZT":
                e.Value = ShowString.ShowDJZT(e.Value.ToString());
                break;

            case "DJZL":
                e.Value = ShowString.ShowFPZL(e.Value.ToString());
                break;

            case "SFZJY":
                e.Value = ShowString.ShowBool(e.Value.ToString());
                break;

            case "HYSY":
                e.Value = ShowString.ShowBool(e.Value.ToString());
                break;

            case "HSJBZ":
                e.Value = ShowString.ShowBool(e.Value.ToString());
                break;
            }
        }
예제 #2
0
        private void aisinoDataGrid1_DataGridCellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            string name = this.aisinoDataGrid1.get_Columns()[e.ColumnIndex].Name;

            if (name != null)
            {
                if (!(name == "KPZT"))
                {
                    if (name == "DJZT")
                    {
                        e.Value = ShowString.ShowDJZT(e.Value.ToString());
                    }
                    else if (name == "DJZL")
                    {
                        e.Value = ShowString.ShowFPZL(e.Value.ToString());
                    }
                    else if (name == "SFZJY")
                    {
                        e.Value = ShowString.ShowBool(e.Value.ToString());
                    }
                    else if (name == "HYSY")
                    {
                        e.Value = ShowString.ShowBool(e.Value.ToString());
                    }
                }
                else
                {
                    e.Value = ShowString.ShowKPZT(e.Value.ToString());
                }
            }
        }