コード例 #1
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        PIP_WPS_NOTableAdapter wps = new PIP_WPS_NOTableAdapter();
        string wps_id = string.Empty;
        string sql    = string.Empty;

        try
        {
            wps.InsertQuery(decimal.Parse(Session["PROJECT_ID"].ToString()), decimal.Parse(cboSubcon.SelectedValue.ToString()),
                            txtWPS1.Text, txtWPS2.Text, txtRevision.Text, cboMatList.SelectedValue, cboProcessList.SelectedValue, radPWHTList.SelectedValue,
                            decimal.Parse(txtSizeFrom.Text), decimal.Parse(txtSizeTo.Text), decimal.Parse(txtThkFrom.Text),
                            decimal.Parse(txtThkTo.Text), cboConnA.SelectedValue.ToString(), cboConnB.SelectedValue.ToString(),
                            "", txtRemarks.Text, AllsubconRadioButton.SelectedValue);

            wps_id = WebTools.GetExpr("WPS_ID", "PIP_WPS_NO", " WHERE WPS_NO1 = '" + txtWPS1.Text + "'");
            for (int i = 0; i < cboPipeClass.Items.Count; i++)
            {
                if (cboPipeClass.Items[i].Checked)
                {
                    sql = "INSERT INTO PIP_WPS_SPEC (WPS_ID, CLASS) VALUES ('" + wps_id + "', '" + cboPipeClass.Items[i].Text + "')";
                    WebTools.ExeSql(sql);
                }
            }

            Master.ShowMessage("WPS Created successfully!");
        }
        catch (Exception ex)
        {
            Master.ShowWarn(ex.Message);
        }
    }
コード例 #2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        PIP_WPS_NOTableAdapter wps = new PIP_WPS_NOTableAdapter();

        try
        {
            wps.InsertQuery(decimal.Parse(Session["PROJECT_ID"].ToString()), decimal.Parse(cboSubcon.SelectedValue.ToString()),
                            txtWPS1.Text, txtWPS2.Text, txtRevision.Text, txtMaterial.Text, txtProcess.Text, txtPWHT.Text,
                            decimal.Parse(txtSizeFrom.Text), decimal.Parse(txtSizeTo.Text), decimal.Parse(txtThkFrom.Text),
                            decimal.Parse(txtThkTo.Text), cboConnA.SelectedValue.ToString(), cboConnB.SelectedValue.ToString(),
                            txtPipeClass.Text, txtRemarks.Text);
            Master.ShowMessage("WPS Created successfully!");
        }
        catch (Exception ex)
        {
            Master.ShowWarn(ex.Message);
        }
    }