Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        oValue.setRequestGet("Type");
        string UploadType = oValue.Data("Type");

        switch (UploadType)
        {
        case "A":
            UploadUrl   = Server.MapPath("~") + @"\upload\global\type02\";
            Label1.Text = "序號件";
            break;

        case "B":
            UploadUrl   = Server.MapPath("~") + @"\upload\global\type04\";
            Label1.Text = "非序號件";
            break;

        case "":
            UploadUrl = Server.MapPath("~") + @"\";
            break;
        }
        KeepType.Text = UploadType;
        string SQL = "";

        Sql.ClearQuery();
        SQL = "select A19I02UV0004,A19F01NV0032 from A19 where A19I03CV0001='B'";
        //Sql.sqlTransferColumn = "A12I03CV0001";
        recordset = Sql.selectTable(SQL, "A19");
        if (recordset != null)
        {
            for (int i = 0; i < recordset.Rows.Count; i++)
            {
                ListItem iTem = new ListItem();
                iTem.Text  = recordset.Rows[i]["A19F01NV0032"].ToString();
                iTem.Value = recordset.Rows[i]["A19I02UV0004"].ToString();
                DropDownList1.Items.Add(iTem);
            }
        }
        else
        {
        }
        Sql.ClearQuery();
        SQL = "select A12I02UV0010,A12I03CV0001,A12F01NV0064 from A12 where A12I03CV0001='A'";
        Sql.sqlTransferColumn = "A12I03CV0001";
        recordset             = Sql.selectTable(SQL, "A12");
        if (recordset != null)
        {
            for (int i = 0; i < recordset.Rows.Count; i++)
            {
                ListItem iTem = new ListItem();
                iTem.Text  = recordset.Rows[i]["A12F01NV0064"].ToString();
                iTem.Value = recordset.Rows[i]["A12I02UV0010"].ToString();
                DropDownList2.Items.Add(iTem);
            }
        }
        else
        {
        }
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Sql.ClearQuery();
        SQL = "select A12I02UV0010,A12I03CV0001,A12F01NV0064 from A12";
        Sql.sqlTransferColumn = "A12I03CV0001";
        dt = Sql.selectTable(SQL, "A12");

        Gd2.DataSource = dt;
        Gd2.DataBind();

        oTemplate.SetTemplatesDir("/template/excel/");
        oTemplate.SetTemplateFileCharset("test.html", "UTF-8");


        thisOut = oTemplate.GetOutput();
    }
Exemple #3
0
    public static string executeSQL(string SQL)
    {
        string pCheck = "success";

        Sql.ClearQuery();
        Sql.transBegin();
        Sql.PureExecuteSQL(SQL);
        Sql.transCommit();
        if (Sql.errorMessage != "")
        {
            ErrRecord(SQL, Sql.errorMessage);
            pCheck = "fail";
        }

        return(pCheck);
    }