2007年7月27日

2007年6月8日

http://dev.csdn.net/article/18/18791.shtm
posted @ 2007-06-08 08:28 随风而去 阅读(76) 评论(1) 编辑

2007年3月29日

2007年3月22日

//使用方法:
//在page_load事件中加入下列样式代码,其中grdPay为GridView. 必须设置grdPay的EmptyDataText属性不为空.
        if (this.IsPostBack == false)
        {
                grdPay.DataBind();
        }
        UGridView grd = new UGridView(grdPay);

//源程序
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public  class UGridView
{
    public  UGridView(GridView grd)
    {
        if (grd.EmptyDataText == "")
        {
            grd.EmptyDataText = "没有符合条件的数据";
        }
        grd.PreRender += new EventHandler(grd_PreRender);       
    }

    void grd_PreRender(object sender, EventArgs e)
    {
        DrawHeader(sender);
    }
    private void Grd_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex == -1)
        {
            DrawHeader(sender);
        }
    }
    private void DrawHeader(object sender)
    {
        GridView grd = (GridView)sender;
        if (grd.Rows.Count > 0) return; //有数据,不要处理
        if (grd.DataSource != null)
        {
            if (((DataTable)grd.DataSource).Rows.Count > 0)
            {
                return;
            }
        }
        GridViewRow row = new GridViewRow(-1, -1,DataControlRowType.EmptyDataRow,DataControlRowState.Normal);
        foreach (DataControlField field in grd.Columns)
        {
            TableCell cell = new TableCell();
            cell.Text = field.HeaderText;
            cell.Width = field.HeaderStyle.Width;
            cell.Height = field.HeaderStyle.Height;
            cell.ForeColor = field.HeaderStyle.ForeColor;
            cell.Font.Size = field.HeaderStyle.Font.Size;
            cell.Font.Bold = field.HeaderStyle.Font.Bold;
            cell.Font.Name = field.HeaderStyle.Font.Name;
            cell.Font.Strikeout = field.HeaderStyle.Font.Strikeout;
            cell.Font.Underline = field.HeaderStyle.Font.Underline;
            cell.BackColor = field.HeaderStyle.BackColor;
            cell.VerticalAlign = field.HeaderStyle.VerticalAlign;
            cell.HorizontalAlign = field.HeaderStyle.HorizontalAlign;
            cell.CssClass = field.HeaderStyle.CssClass;
            cell.BorderColor = field.HeaderStyle.BorderColor;
            cell.BorderStyle = field.HeaderStyle.BorderStyle;
            cell.BorderWidth = field.HeaderStyle.BorderWidth;
            row.Cells.Add(cell);               
        }    
      
        TableItemStyle headStyle = grd.HeaderStyle;
        TableItemStyle emptyStyle = grd.EmptyDataRowStyle;
        emptyStyle.Width = headStyle.Width;
        emptyStyle.Height = headStyle.Height;
        emptyStyle.ForeColor = headStyle.ForeColor;
        emptyStyle.Font.Size = headStyle.Font.Size;
        emptyStyle.Font.Bold = headStyle.Font.Bold;
        emptyStyle.Font.Name = headStyle.Font.Name;
        emptyStyle.Font.Strikeout = headStyle.Font.Strikeout;
        emptyStyle.Font.Underline = headStyle.Font.Underline;
        emptyStyle.BackColor = headStyle.BackColor;
        emptyStyle.VerticalAlign = headStyle.VerticalAlign;
        emptyStyle.HorizontalAlign = headStyle.HorizontalAlign;
        emptyStyle.CssClass = headStyle.CssClass;
        emptyStyle.BorderColor = headStyle.BorderColor;
        emptyStyle.BorderStyle = headStyle.BorderStyle;
        emptyStyle.BorderWidth = headStyle.BorderWidth;
        if (grd.Controls.Count == 0)
        {
            grd.Page.Response.Write("<script language='javascript'>alert('必须在初始化表格类之前执行DataBind方法并设置EmptyDataText属性不为空!');</script>");
        }
        else
        {
            grd.Controls[0].Controls.Clear(); //删除没数据时的提示
            grd.Controls[0].Controls.AddAt(0, row);
        }          

    }

}

posted @ 2007-03-22 16:03 随风而去 阅读(1780) 评论(0) 编辑

2007年1月17日

我们经常会在sharepoint中碰到这样的一种需求,部门文档要部分放到公司文档库或其它部门文档库中,而又不想保存多份文件副本,因此需要一个发布链接到其它部门,本程序就是实现了这个功能.

WSS发布链接源程序
posted @ 2007-01-17 22:37 随风而去 阅读(94) 评论(0) 编辑
 

microsoft只提到了辅助域控失败后的值,没有提到整个域失败后处理方法。
http://support.microsoft.com/kb/312862/zh-cn 这是主要方法。

cn=ntfrs subscriptions
frsworkingpath: c:\windows\ntfrs

cn=domain system volume(sysvol share)
frsPrimaryMember:CN=DELLITZHONG,CN=Domain System Volume (SYSVOL share),CN=File Replication Service,CN=System,DC=FindTest,DC=Local
frsReplicaSetType:2

域控:
Frs-Computer-Reference: CN=ADMINSVR,OU=Domain Controllers,DC=toneluck,DC=com,DC=cn
Server-Reference: CN=NTDS Settings,CN=ADMINSVR,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=toneluck,DC=com,DC=cn
CN=Domain System Volume (SYSVOL share),CN=NTFRS Subscriptions

订阅者subscriptions
cn=Domain System Volume (SYSVOL share)
frs root path: C:\WINDOWS\SYSVOL\domain
frsstagingpath: C:\WINDOWS\SYSVOL\staging\domain
frsMemberRefrerence:CN=EMAIL,CN=Domain System Volume (SYSVOL share),CN=File Replication Service,CN=System,DC=toneluck,DC=com,DC=cn

posted @ 2007-01-17 11:46 随风而去 阅读(180) 评论(0) 编辑

2006年12月14日

摘要: 状态机工作流.实列.报销审批流程(一) http://www.cnblogs.com/flashelf/articles/522348.htmlMSWWF学习几点参考之A http://www.seven.net.cn/Article_Show.asp?ArticleID=255制作自定义工作流(WWF)设计器http://www.cnblogs.com/dlwang2002/archive/20...阅读全文
posted @ 2006-12-14 15:48 随风而去 阅读(57) 评论(0) 编辑

2006年12月5日

摘要: http://support.microsoft.com/kb/q282474/阅读全文
posted @ 2006-12-05 14:41 随风而去 阅读(129) 评论(0) 编辑

2006年11月27日

摘要: using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.We...阅读全文
posted @ 2006-11-27 12:10 随风而去 阅读(136) 评论(0) 编辑

2006年11月10日

摘要: --1.给表中字段添加描述信息CreatetableT2(idint,namechar(20))GOEXECsp_addextendedproperty'MS_Description','EmployeeID','user',dbo,'table',T2,'column',idEXECsp_updateextendedproperty'MS_Description','thisisatest','...阅读全文
posted @ 2006-11-10 23:55 随风而去 阅读(44) 评论(0) 编辑