コード例 #1
0
ファイル: Create.aspx.cs プロジェクト: jiming-liang/WI4
    void Preview2()
    {
        this.GetDs();
        PreviewPDF preview = new PreviewPDF();

        preview.ds  = ds;
        preview.Rig = this.Rig;
        switch (this.WiType)
        {
        case "WI":
            preview.Prefix = "WI-";
            preview.Rig    = ds.Tables[0].Rows[0]["rig"].ToString();
            break;

        case "WIS":
            preview.Prefix = "WIS-";
            preview.Rig    = ds.Tables[0].Rows[0]["facility"].ToString();
            break;
        }
        preview.Headers        = this.Headers;
        preview.BaseUrl        = this.BaseUrl;
        preview.LessThanEncode = this.LessThanEncode;
        preview.AmpEncode      = this.AmpEncode;
        preview.SelectedStatus = this.Status.SelectedValue;
        preview.Start(this.Response, this.UserName);
        if (this.WiType != "WIT")
        {
            SortedList sl = new SortedList();
            sl.Add("@id", this.id);
            sl.Add("@WiType", this.WiType);
            this.da.GetDataSet("usp_updateWiPrinted", sl);
        }
    }
コード例 #2
0
ファイル: Create.aspx.cs プロジェクト: jiming-liang/WI4
    void PreviewStart(string type)
    {
        PdfAndWord common;

        if (type == "PDF")
        {
            common = new PreviewPDF();
        }
        else
        {
            common = new Word();
        }
        this.GetDs();
        common.ds  = ds;
        common.Rig = this.Rig;

        switch (this.WiType)
        {
        case "WI":
            common.Prefix = "WI-";
            common.Rig    = ds.Tables[0].Rows[0]["rig"].ToString();
            break;

        case "WIS":
            common.Prefix = "WIS-";
            common.Rig    = ds.Tables[0].Rows[0]["facility"].ToString();
            break;
        }
        common.Headers        = this.Headers;
        common.BaseUrl        = this.BaseUrl;
        common.LessThanEncode = this.LessThanEncode;
        common.AmpEncode      = this.AmpEncode;
        common.SelectedStatus = this.Status.SelectedValue;
        common.Start(this.Response, this.UserName);
    }
コード例 #3
0
ファイル: CopyWI.aspx.cs プロジェクト: jiming-liang/WI4
 void Export(string cat) {
     PreviewPDF preview = new PreviewPDF();
     preview.ds = ds;
     preview.Rig = this.Rig;
     preview.ExportPath = this.ExportPath;
     preview.Headers = this.Headers;
     preview.BaseUrl = this.BaseUrl;
     preview.LessThanEncode = this.LessThanEncode;
     preview.AmpEncode = this.AmpEncode;
     DataRow dr = this.ds.Tables[0].Rows[0];
     preview.Prefix = "WI-";
     string wiNo = "WI-" + dr["rig"] + "-" + dr["name"] ; // this.ds.Tables[0].Rows[0]["WINo"].ToString();
     if (this.Rig != null) {
         wiNo = wiNo.Replace(wiNo.Split('-')[1], this.Rig);
     }
     preview.WiNo = wiNo;
     preview.Copy(cat, this.UserName);
 }