51CTO技术论坛_中国领先的IT技术社区's Archiver

驳客 发表于 2007-4-9 22:14

帖子特效之四:代码很重要

在论坛中不管回答问题还是提出问题,都难免不需要命令行和代码。如何书写代码比较方便呢?其实很简单,就是用Code功能。

[QUOTE]
功能名   具体功能
code:代码显示,并且在右侧会增加一个按钮,将代码里面的内容拷贝到剪切板。

[color=blue][b]使用方法:[功能名:code]特效文字[/功能名][/b][/color]
[/quote]

[b]示例[/b]

[code]
For(i=1,i>=5,i++)
{
printf(*)
}
[/code]

[[i] 本帖最后由 驳客 于 2007-4-9 22:16 编辑 [/i]]

jscjmx51 发表于 2007-5-9 10:37

功能名   具体功能
code:代码显示,并且在右侧会增加一个按钮,将代码里面的内容拷贝到剪切板。bbs.51cto.com
fHP9|| |

使用方法:[功能名:code]特效文字[/功能名]

华为fans 发表于 2008-4-6 00:36

这个不懂。。。。

北京来的 发表于 2008-8-25 14:05

还要继续学习哦

topboys 发表于 2008-8-30 09:27

this is a test

[功能名:code]/// <summary>
                /// 获得所有机构信息
                /// </summary>
                /// <returns></returns>
                public DataTable GetBraTB()
                {
                        DataTable table ;
                        using(MrDep BraAccess = new MrDep())
                        {
                                table = BraAccess.GetBraData().Tables[0];
                        }
                        return table;
                }
               
                /// <summary>
                /// 获得所有部门信息
                /// </summary>
                /// <returns></returns>
                public DataTable GetDepTB()
                {
                        DataTable table;
                        using(MrDep DepAccess = new MrDep())
                        {
                                table = DepAccess.GetDepData().Tables[0];
                        }
                        return table;
                }
                /// <summary>
                /// 获得指定的部门的信息
                /// </summary>
                /// <param name="depID"></param>
                public DataTable GetDepTB_By_DepID(int depID)
                {
                        DataTable table ;

                        using (MrDep DepAccess = new MrDep())
                        {
                                table = DepAccess.GetDepData_By_DepID(depID).Tables[0];
                        }

                        return table;

                }
                /// <summary>
                /// 获取属于指定机构的部门的信息
                /// </summary>
                /// <param name="branchID"></param>
                /// <returns></returns>
                public DataTable GetDepTB_By_BranchID(int branchID)
                {
                        DataTable table ;

                        using(MrDep DepAccess = new MrDep())
                        {
                                table = DepAccess.GetDepData_By_BranchID(branchID).Tables[0];
                        }

                        return table;
                }

                /// <summary>
                /// 删除指定的部门
                /// </summary>
                /// <param name="depID"></param>
                public bool DeleteDep(int depID)
                {
                        bool result;
                        using(MrDep DepAccess = new MrDep())
                        {
                                result = DepAccess.DeleteMrDep(depID);
                        }
                        return result;
                }
[/功能名]

topboys 发表于 2008-8-30 09:28

/// <summary>
                /// 获得所有机构信息
                /// </summary>
                /// <returns></returns>
                public DataTable GetBraTB()
                {
                        DataTable table ;
                        using(MrDep BraAccess = new MrDep())
                        {
                                table = BraAccess.GetBraData().Tables[0];
                        }
                        return table;
                }
               
                /// <summary>
                /// 获得所有部门信息
                /// </summary>
                /// <returns></returns>
                public DataTable GetDepTB()
                {
                        DataTable table;
                        using(MrDep DepAccess = new MrDep())
                        {
                                table = DepAccess.GetDepData().Tables[0];
                        }
                        return table;
                }
                /// <summary>
                /// 获得指定的部门的信息
                /// </summary>
                /// <param name="depID"></param>
                public DataTable GetDepTB_By_DepID(int depID)
                {
                        DataTable table ;

                        using (MrDep DepAccess = new MrDep())
                        {
                                table = DepAccess.GetDepData_By_DepID(depID).Tables[0];
                        }

                        return table;

                }
                /// <summary>
                /// 获取属于指定机构的部门的信息
                /// </summary>
                /// <param name="branchID"></param>
                /// <returns></returns>
                public DataTable GetDepTB_By_BranchID(int branchID)
                {
                        DataTable table ;

                        using(MrDep DepAccess = new MrDep())
                        {
                                table = DepAccess.GetDepData_By_BranchID(branchID).Tables[0];
                        }

                        return table;
                }

                /// <summary>
                /// 删除指定的部门
                /// </summary>
                /// <param name="depID"></param>
                public bool DeleteDep(int depID)
                {
                        bool result;
                        using(MrDep DepAccess = new MrDep())
                        {
                                result = DepAccess.DeleteMrDep(depID);
                        }
                        return result;
                }

topboys 发表于 2008-8-30 09:28

貌似没差啊。。。

me13803816717 发表于 2008-11-10 14:07

传奇.魔兽.魔域.传世.奇迹赚钱之道

*** 作者被禁止或删除 内容自动屏蔽 ***

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.