`
文章列表

C#获取本地IP

    博客分类:
  • C#
/// <summary> /// 获取本地Ip /// </summary> private string GetLocalIP() { IPHostEntry ipHostEntry = Dns.GetHostEntry(Dns.GetHostName()); if (ipHostEntry.AddressList.Length > 0) { foreach (IP ...
restore filelistonly from disk='c:\xx.bak'  

只能启动单个程序

    博客分类:
  • C#
bool ret; System.Threading.Mutex m = new System.Threading.Mutex(true, Application.ProductName, out ret); if (ret) { System.Windows.Forms.Application.EnableVisualStyles(); //这两行实现 XP 可视风格 System.Windows.Forms.Applicat ...

.Net控件命名规范

    博客分类:
  • C#
<!--------------A----------------->AdRotator                   ar<!--------------B----------------->Button                      btn<!--------------C----------------->Calender                    calCheckBox                    chkCheckBoxList                chklstColumn (DataGridView的 ...
DataGridView绑定数据时,时间格式显示问题 今天做程序的时候,遇到了这样的问题,数据库里面是 2011-09-26 18:48:41.390 可是绑定后却显示为 2011-09-26 18:48   解决办法: DataGridView.Columns["列名"].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss.fff";  
dgv.Rows[i].DefaultCellStyle.BackColor = dgv.RowsDefaultCellStyle.BackColor;  
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D; using System.Runtime.InteropServices; namespace WinDemo { public pa ...
[DllImport("USER32.DLL")] public static extern int GetSystemMenu(int hwnd, int bRevert); [DllImport("USER32.DLL")] public static extern int RemoveMenu(int hMenu, int nPosition, int wFlags); /// <summary> /// 返回值,非零表示成功,零 ...

查看sql死锁

    博客分类:
  • SQL
 
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_who_lock]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[sp_who_lock] GO use master go create procedure sp_who_lock as begin declare @spid int,@bl int, @intTransactionCountOnEntry int, ...
关于“MMC不能打开文件C:\Program Files\Microsoft SQL Server\80\Tools\Binn\SQL Server Enterprise Manager.MSC可能是由于文件不存在,不是一个MMC控制台,或者用后来的MMC版本创建。也可能你没有访问此文件的足够权限 ” 运行mmc,控制台--添加/删除管理单元--添加--找到Microsoft   SQL   企业管理器--添加--关闭--确定    回到控制台--选项--控制台模式选择"用户模式完全访问"--将下面的选择全部取消     控制台--另存为--存储为:C:\Program F ...
--判断表是否被更改 select checksum_agg(binary_checksum(*)) from dbo.PrintLog --判断表中每行是否被修改 select binary_checksum(*) from dbo.PrintLog  
using System; using System.Runtime.InteropServices; 调用 Interaction.Beep(); 使用MessageBeep(unit uType):需添加 using System.Runtime.InteropServices; public const int MB_ICONEXCLAMATION =  48;   [DllImport("user32.dll")]  public static extern bool MessageBeep(uint uType); MessageBeep( MB_ICO ...
/// <summary> /// 创建控制台窗口 /// </summary> /// <returns></returns> [DllImport("kernel32.dll")] public static extern bool AllocConsole(); /// <summary> /// 释放控制台窗口 /// </summary&g ...
--允许系统标更新 exec sp_configure 'allow updates','1' go reconfigure with override go ----添加列 ALTER TABLE dbo.GoodsPrinter ADD GoodsStallId NVARCHAR(100) --把第一列之后的列往后移1(colid从1开始) update syscolumns set colid=colid+1 where colid>=2 and id = object_id('GoodsPrinter') --更新列顺序 update syscolu ...
del c:\winnt\wc98pp.dll del c:\windows\wc98pp.dll regsvr32 actxprxy.dll /s regsvr32 shdocvw.dll /s regsvr32 mshtml.dll /s regsvr32 urlmon.dll /s regsvr32 msjava.dll /s regsvr32 browseui.dll /s pause
Global site tag (gtag.js) - Google Analytics