Exemple #1
0
    //레이블 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = new DataSet();

        using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
        {
            //[2]Fill
            //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
            ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_SCORE", Convert.ToInt32(Request["SCM_ScoreID"]));


            if (ds.Tables[0].Rows.Count > 0)
            {
                //[3]내용이 길어서.. 출력 오류 날수 있으니..나중에 체크하자..

                lblPostDate.Text = ds.Tables[0].Rows[0]["PostDate"].ToString().Substring(0, 10);
                lbltester.Text   = ds.Tables[0].Rows[0]["tester"].ToString();

                lbllangScore.Text = ds.Tables[0].Rows[0]["langScore"].ToString();
                lblengScore.Text  = ds.Tables[0].Rows[0]["engScore"].ToString();
                lblmathScore.Text = ds.Tables[0].Rows[0]["mathScore"].ToString()
                                    .Replace("\r\n", "<br />");

                lbltotalScore.Text = ds.Tables[0].Rows[0]["totalScore"].ToString();
                lblpf.Text         = ds.Tables[0].Rows[0]["pf"].ToString();
                lblReadCount.Text  = ds.Tables[0].Rows[0]["ReadCount"].ToString()
                                     .Replace("\r\n", "<br />");
            }
        }
    }
    //텍스트 박스 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = null;

        try
        {
            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[2]Fill
                //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
                ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_ETRI", Convert.ToInt32(Request["SCM_NewsID"]));

                //[3]Bind
                txtTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
                txtwt1.Text   = ds.Tables[0].Rows[0]["wt1"].ToString();

                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();
            }
        }
        catch (Exception err)
        {
            //[4]예외
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //텍스트 박스 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = null;

        try
        {
            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[2]Fill
                //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
                ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_SCORE", Convert.ToInt32(Request["SCM_ScoreID"]));

                //[3]Bind
                txttester.Text     = ds.Tables[0].Rows[0]["tester"].ToString();
                txtlangScore.Text  = ds.Tables[0].Rows[0]["langScore"].ToString();
                txtengScore.Text   = ds.Tables[0].Rows[0]["engScore"].ToString();
                txtmathScore.Text  = ds.Tables[0].Rows[0]["mathScore"].ToString();
                txttotalScore.Text = ds.Tables[0].Rows[0]["totalScore"].ToString();
                txtpf.Text         = ds.Tables[0].Rows[0]["pf"].ToString();
            }
        }
        catch (Exception err)
        {
            //[4]예외
            Response.Write(err.Source + " : " + err.Message);
        }
    }
Exemple #4
0
    //[4]삭제
    protected void btnDelete_Click(object sender, ImageClickEventArgs e)
    {
        //[1]script
        string strAlert = @"<script>alert('삭제되었습니다.');location.href='SCM_NoticeList.aspx';</script>";

        try
        {
            using (Is.Notice.Bsl.Notice_RTx rBsl = new Is.Notice.Bsl.Notice_RTx())
            {
                SqlConnection con = new SqlConnection(
                    ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                SqlCommand cmd = new SqlCommand("UP_DeleteSCM_SCORE", con);
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.AddWithValue("@SCM_ScoreID", Convert.ToInt32(Request["SCM_ScoreID"]));

                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }

            //[3]
            Page.RegisterStartupScript("EndScript", strAlert);
        }
        catch (Exception err)
        {
            //[4]
            //Response.Write(err.Source + " : " + err.Message);
        }
    }
Exemple #5
0
    //레이블 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = new DataSet();

        using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
        {
            //[2]Fill
            //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
            ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Sales", Convert.ToInt32(Request["SCM_SalesID"]));


            if (ds.Tables[0].Rows.Count > 0)
            {
                //[3]내용이 길어서.. 출력 오류 날수 있으니..나중에 체크하자..
                lblReadCount.Text   = ds.Tables[0].Rows[0]["ReadCount"].ToString();
                lblPostDate.Text    = ds.Tables[0].Rows[0]["PostDate"].ToString().Substring(0, 10);
                lblSCM_SalesID.Text = ds.Tables[0].Rows[0]["SCM_SalesID"].ToString();
                lbltotal1.Text      = ds.Tables[0].Rows[0]["total1"].ToString()
                                      .Replace("\r\n", "<br />");


                lblTitle.Text      = ds.Tables[0].Rows[0]["Title"].ToString();
                lblsalesdate1.Text = ds.Tables[0].Rows[0]["salesdate1"].ToString();

                lblcompany1.Text = ds.Tables[0].Rows[0]["company1"].ToString();
                /*lblterm.Text = ds.Tables[0].Rows[0]["term"].ToString();*/
                lblprice1.Text = ds.Tables[0].Rows[0]["price1"].ToString();
                lblitem1.Text  = ds.Tables[0].Rows[0]["item1"].ToString();

                /*lblcontent2.Text = ds.Tables[0].Rows[0]["content2"].ToString()
                 * .Replace("\r\n", "<br />");*/
                lblsupply1.Text = ds.Tables[0].Rows[0]["supply1"].ToString();
                /*lbldeadline.Text = ds.Tables[0].Rows[0]["deadline"].ToString();*/
                /*lblsalesman1.Text = ds.Tables[0].Rows[0]["salesman1"].ToString();*/
                lblvat1.Text     = ds.Tables[0].Rows[0]["vat1"].ToString();
                lblea1.Text      = ds.Tables[0].Rows[0]["ea1"].ToString();
                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();



                if ((lblFileName.Text != null) && (lblFileName.Text != ""))
                {
                    btnFile.Visible = true;
                }
                else
                {
                    btnFile.Visible = false;
                }
            }
            else
            {
                lblNoticeError.Text = "잘못된 요청입니다";
            }
        }
    }
    //레이블 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = new DataSet();

        using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
        {
            //[2]Fill
            //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
            ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Notice", Convert.ToInt32(Request["SCM_NoticeID"]));


            if (ds.Tables[0].Rows.Count > 0)
            {
                //[3]내용이 길어서.. 출력 오류 날수 있으니..나중에 체크하자..
                lblReadCount.Text    = ds.Tables[0].Rows[0]["ReadCount"].ToString();
                lblPostDate.Text     = ds.Tables[0].Rows[0]["PostDate"].ToString().Substring(0, 10);
                lblSCM_NoticeID.Text = ds.Tables[0].Rows[0]["SCM_NoticeID"].ToString();
                lblContent.Text      = ds.Tables[0].Rows[0]["Content"].ToString()
                                       .Replace("\r\n", "<br />");


                lblTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
                lblps.Text    = ds.Tables[0].Rows[0]["ps"].ToString();

                lblts1.Text   = ds.Tables[0].Rows[0]["ts1"].ToString();
                lbllink1.Text = ds.Tables[0].Rows[0]["link1"].ToString();
                lblsec1.Text  = ds.Tables[0].Rows[0]["sec1"].ToString();
                lblcode1.Text = ds.Tables[0].Rows[0]["code1"].ToString();
                lblcs1.Text   = ds.Tables[0].Rows[0]["cs1"].ToString()
                                .Replace("\r\n", "<br />");
                lbltech1.Text     = ds.Tables[0].Rows[0]["tech1"].ToString();
                lblDead1.Text     = ds.Tables[0].Rows[0]["Dead1"].ToString();
                lblcorp1.Text     = ds.Tables[0].Rows[0]["corp1"].ToString();
                lblProgress1.Text = ds.Tables[0].Rows[0]["Progress1"].ToString();
                lbllang1.Text     = ds.Tables[0].Rows[0]["lang1"].ToString();
                lblFileName.Text  = ds.Tables[0].Rows[0]["UpFileName"].ToString();



                if ((lblFileName.Text != null) && (lblFileName.Text != ""))
                {
                    btnFile.Visible = true;
                }
                else
                {
                    btnFile.Visible = false;
                }
            }
            else
            {
                lblNoticeError.Text = "잘못된 요청입니다";
            }
        }
    }
Exemple #7
0
    //레이블 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = new DataSet();

        using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
        {
            //[2]Fill
            //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
            ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Notice", Convert.ToInt32(Request["SCM_NoticeID"]));


            if (ds.Tables[0].Rows.Count > 0)
            {
                //[3]내용이 길어서.. 출력 오류 날수 있으니..나중에 체크하자..

                lblContent.Text = ds.Tables[0].Rows[0]["Content"].ToString()
                                  .Replace("\r\n", "<br />");

                lblPostDate.Text = ds.Tables[0].Rows[0]["PostDate"].ToString().Substring(0, 10);
                lblproject.Text  = ds.Tables[0].Rows[0]["project"].ToString();

                lbldate1.Text    = ds.Tables[0].Rows[0]["date1"].ToString();
                lblcustomer.Text = ds.Tables[0].Rows[0]["customer"].ToString();
                lbletc.Text      = ds.Tables[0].Rows[0]["etc"].ToString()
                                   .Replace("\r\n", "<br />");

                lblperiod1.Text   = ds.Tables[0].Rows[0]["period1"].ToString();
                lbldueDate.Text   = ds.Tables[0].Rows[0]["dueDate"].ToString();
                lblprogress1.Text = ds.Tables[0].Rows[0]["progress1"].ToString();
                lblcompany.Text   = ds.Tables[0].Rows[0]["company"].ToString();
                lblcode1.Text     = ds.Tables[0].Rows[0]["code1"].ToString();
                lbllanguage1.Text = ds.Tables[0].Rows[0]["language1"].ToString();
                lbltodo.Text      = ds.Tables[0].Rows[0]["todo"].ToString();
                lbltech.Text      = ds.Tables[0].Rows[0]["tech"].ToString();
                lblReadCount.Text = ds.Tables[0].Rows[0]["ReadCount"].ToString()
                                    .Replace("\r\n", "<br />");
                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();

                if ((lblFileName.Text != null) && (lblFileName.Text != ""))
                {
                    btnFile.Visible = true;
                }
                else
                {
                    btnFile.Visible = false;
                }
            }
            else
            {
                lblNoticeError.Text = "잘못된 요청입니다";
            }
        }
    }
Exemple #8
0
    //텍스트 박스 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = null;

        try
        {
            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[2]Fill
                //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
                ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Order", Convert.ToInt32(Request["SCM_OrderID"]));

                //[3]Bind
                txtserial_num.Text = ds.Tables[0].Rows[0]["serial_num"].ToString()
                                     .Replace("\r\n", "<br />");

                txtdue_date.Text = ds.Tables[0].Rows[0]["due_date"].ToString();
                txtc_num.Text    = ds.Tables[0].Rows[0]["c_num"].ToString();

                txtc_name.Text    = ds.Tables[0].Rows[0]["c_name"].ToString();
                txtc_leader.Text  = ds.Tables[0].Rows[0]["c_leader"].ToString();
                txtc_address.Text = ds.Tables[0].Rows[0]["c_address"].ToString()
                                    .Replace("\r\n", "<br />");

                txtc_charge.Text   = ds.Tables[0].Rows[0]["c_charge"].ToString();
                txtc_phonenum.Text = ds.Tables[0].Rows[0]["c_phonenum"].ToString();
                lblcode.Text       = ds.Tables[0].Rows[0]["code"].ToString();
                lblitem.Text       = ds.Tables[0].Rows[0]["item"].ToString();
                lblamount.Text     = ds.Tables[0].Rows[0]["amount"].ToString();
                lbluniprice.Text   = ds.Tables[0].Rows[0]["uniprice"].ToString();
                lblprice.Text      = ds.Tables[0].Rows[0]["price"].ToString();
                lblvat.Text        = ds.Tables[0].Rows[0]["vat"].ToString();
                txtt_amount.Text   = ds.Tables[0].Rows[0]["t_amount"].ToString()
                                     .Replace("\r\n", "<br />");
                txtt_uniprice.Text = ds.Tables[0].Rows[0]["t_uniprice"].ToString();
                txtt_vat.Text      = ds.Tables[0].Rows[0]["t_vat"].ToString();
                txtt_price.Text    = ds.Tables[0].Rows[0]["t_price"].ToString();
                txtprice_kor.Text  = ds.Tables[0].Rows[0]["price_kor"].ToString();
                txtprice_num.Text  = ds.Tables[0].Rows[0]["price_num"].ToString();



                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();
            }
        }
        catch (Exception err)
        {
            //[4]예외
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //텍스트 박스 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = null;

        try
        {
            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[2]Fill
                //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
                ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Notice", Convert.ToInt32(Request["SCM_NoticeID"]));

                //[3]Bind
                txtproject.Text   = ds.Tables[0].Rows[0]["project"].ToString();
                txtdate1.Text     = ds.Tables[0].Rows[0]["date1"].ToString();
                txtcustomer.Text  = ds.Tables[0].Rows[0]["customer"].ToString();
                txtetc.Text       = ds.Tables[0].Rows[0]["etc"].ToString();
                txtperiod1.Text   = ds.Tables[0].Rows[0]["period1"].ToString();
                txtlanguage1.Text = ds.Tables[0].Rows[0]["language1"].ToString();
                txttodo.Text      = ds.Tables[0].Rows[0]["todo"].ToString();
                txtdueDate.Text   = ds.Tables[0].Rows[0]["dueDate"].ToString();
                txtprogress1.Text = ds.Tables[0].Rows[0]["progress1"].ToString();
                txtcompany.Text   = ds.Tables[0].Rows[0]["company"].ToString();
                txtcode1.Text     = ds.Tables[0].Rows[0]["code1"].ToString();
                txtContent.Text   = ds.Tables[0].Rows[0]["Content"].ToString()
                                    .Replace("\r\n", "<br />");
                txttech.Text = ds.Tables[0].Rows[0]["tech"].ToString();

                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();
            }
        }
        catch (Exception err)
        {
            //[4]예외
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //텍스트 박스 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = null;

        try
        {
            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[2]Fill
                //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
                ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Notice", Convert.ToInt32(Request["SCM_NoticeID"]));

                //[3]Bind
                txtTitle.Text     = ds.Tables[0].Rows[0]["Title"].ToString();
                txtps.Text        = ds.Tables[0].Rows[0]["ps"].ToString();
                txtts1.Text       = ds.Tables[0].Rows[0]["ts1"].ToString();
                txtcs1.Text       = ds.Tables[0].Rows[0]["cs1"].ToString();
                txtlink1.Text     = ds.Tables[0].Rows[0]["link1"].ToString();
                txtlang1.Text     = ds.Tables[0].Rows[0]["lang1"].ToString();
                txtsec1.Text      = ds.Tables[0].Rows[0]["sec1"].ToString();
                txtDead1.Text     = ds.Tables[0].Rows[0]["Dead1"].ToString();
                txtProgress1.Text = ds.Tables[0].Rows[0]["Progress1"].ToString();
                txtcorp1.Text     = ds.Tables[0].Rows[0]["corp1"].ToString();
                txtcode1.Text     = ds.Tables[0].Rows[0]["code1"].ToString();
                txtContent.Text   = ds.Tables[0].Rows[0]["Content"].ToString()
                                    .Replace("\r\n", "<br />");
                txttech1.Text = ds.Tables[0].Rows[0]["tech1"].ToString();

                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();
            }
        }
        catch (Exception err)
        {
            //[4]예외
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //Submit
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {   //이 부분은 db에는 한줄씩 리스트에는 여러줄로 출력되는형태에 필요한 부분! 혹시 몰라 안지우고 주석처리합니당
        // string sub_codes ="";
        // string sub_items ="";
        // string sub_amounts ="";
        // string sub_prices ="";
        // string sub_uniprices ="";
        // string sub_vats ="";

        // sub_codes = submit_codes.Text;
        // string [] list_codes = sub_codes.Split(','); // ["액자,물티슈,노트북..."] => ["액자","물티슈","노트북"]  리스트길이는 3
        // 위에 있는건 리스트 길이가 1, 오른쪽은 리스트 길이가 3 (,을 기준으로 리스트를 생성해줌)


        // sub_items = submit_items.Text;
        // string [] list_items = sub_items.Split(',');

        // sub_uniprices = submit_uniprices.Text;
        // string [] list_uniprices = sub_uniprices.Split(',');

        // sub_prices = submit_prices.Text;
        // string [] list_prices = sub_prices.Split(',');

        // sub_amounts = submit_amounts.Text;
        // string [] list_amounts = sub_amounts.Split(',');

        // sub_vats = submit_vats.Text;
        // string [] list_vats = sub_vats.Split(',');


        // for (int i = 0; i < list_vats.Length ; i++){ // 리스트 길이만큼 반복해 이 부분을


        string UpfileName    = ""; // 이 부분은 데이터 베이스에 추가가 되는부분 ,포문 안에 있으니깐 리스트 길이 만큼 반복->이것도 예전꺼
        string dbFileName    = string.Empty;
        string strserial_num = "";
        string strdue_date   = "";

        string strc_num      = "";
        string strc_name     = "";
        string strc_leader   = "";
        string strc_address  = "";
        string strc_charge   = "";
        string strc_phonenum = "";

        string strcode     = "";
        string stritem     = "";
        string stramount   = "";
        string struniprice = "";
        string strprice    = "";
        string strvat      = "";

        string strt_amount   = "";
        string strt_uniprice = "";
        string strt_price    = "";
        string strt_vat      = "";

        string strprice_kor = "";
        string strprice_num = "";


        string path = "c:\\inetpub\\joblink\\fileUpload\\Order\\";


        string strAlert = @"<script>alert('입력했습니다.');location.href='SCM_NoticeList.aspx';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\Order\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo     = new FileInfo(SaveLocation);
            string   newUpFile = string.Empty;
            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\Order\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }
            FileUpload1.SaveAs(SaveLocation);
        }
        try
        {
            //[2]변환
            strserial_num = txtserial_num.Text
                            .Replace("&", "&amp;")
                            .Replace("<", "&lt;")
                            .Replace(">", "&gt;")
                            .Replace("\r\n", "<br>")
                            .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strdue_date = txtdue_date.Text
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_num = txtc_num.Text
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_name = txtc_name.Text
                        .Replace("&", "&amp;")
                        .Replace("<", "&lt;")
                        .Replace(">", "&gt;")
                        .Replace("\r\n", "<br>")
                        .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_leader = txtc_leader.Text
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_address = txtc_address.Text
                           .Replace("&", "&amp;")
                           .Replace("<", "&lt;")
                           .Replace(">", "&gt;")
                           .Replace("\r\n", "<br>")
                           .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_charge = txtc_charge.Text
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_phonenum = txtc_phonenum.Text
                            .Replace("&", "&amp;")
                            .Replace("<", "&lt;")
                            .Replace(">", "&gt;")
                            .Replace("\r\n", "<br>")
                            .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strcode = submit_codes.Text //list_codes[i] // 이 끝부분에 i= 0~리스트 길이 만큼의 리스트 항목을 반환 =>['물티슈','액자','노트북'] 처음에는 물티슈로 디비에 저장
                                        // 두번쨰는 액자로 저장
                      .Replace("&", "&amp;")
                      .Replace("<", "&lt;")
                      .Replace(">", "&gt;")
                      .Replace("\r\n", "<br>")
                      .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            stritem = submit_items.Text // list_items[i]
                      .Replace("&", "&amp;")
                      .Replace("<", "&lt;")
                      .Replace(">", "&gt;")
                      .Replace("\r\n", "<br>")
                      .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            stramount = submit_amounts.Text //list_amounts[i]
                        .Replace("&", "&amp;")
                        .Replace("<", "&lt;")
                        .Replace(">", "&gt;")
                        .Replace("\r\n", "<br>")
                        .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            struniprice = submit_uniprices.Text//list_uniprices[i]
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strprice = submit_prices.Text //list_prices[i]
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strvat = submit_vats.Text//list_vats[i]
                     .Replace("&", "&amp;")
                     .Replace("<", "&lt;")
                     .Replace(">", "&gt;")
                     .Replace("\r\n", "<br>")
                     .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_amount = txtt_amount.Text

                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_uniprice = txtt_uniprice.Text
                            .Replace("&", "&amp;")
                            .Replace("<", "&lt;")
                            .Replace(">", "&gt;")
                            .Replace("\r\n", "<br>")
                            .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_price = txtt_price.Text
                         .Replace("&", "&amp;")
                         .Replace("<", "&lt;")
                         .Replace(">", "&gt;")
                         .Replace("\r\n", "<br>")
                         .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_vat = txtt_vat.Text
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strprice_kor = txtprice_kor.Text
                           .Replace("&", "&amp;")
                           .Replace("<", "&lt;")
                           .Replace(">", "&gt;")
                           .Replace("\r\n", "<br>")
                           .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strprice_num = txtprice_num.Text
                           .Replace("&", "&amp;")
                           .Replace("<", "&lt;")
                           .Replace(">", "&gt;")
                           .Replace("\r\n", "<br>")
                           .Replace("\t", "&nbsp;&nbsp;&nbsp;");


            if (strserial_num != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@serial_num", strserial_num);
                    cmd.Parameters.AddWithValue("@due_date", strdue_date);
                    cmd.Parameters.AddWithValue("@c_num", strc_num);
                    cmd.Parameters.AddWithValue("@c_name", strc_name);
                    cmd.Parameters.AddWithValue("@c_leader", strc_leader);
                    cmd.Parameters.AddWithValue("@c_address", strc_address);
                    cmd.Parameters.AddWithValue("@c_charge", strc_charge);
                    cmd.Parameters.AddWithValue("@c_phonenum", strc_phonenum);
                    cmd.Parameters.AddWithValue("@code", strcode);
                    cmd.Parameters.AddWithValue("@item", stritem);
                    cmd.Parameters.AddWithValue("@amount", stramount);
                    cmd.Parameters.AddWithValue("@uniprice", struniprice);
                    cmd.Parameters.AddWithValue("@price", strprice);
                    cmd.Parameters.AddWithValue("@vat", strvat);
                    cmd.Parameters.AddWithValue("@t_amount", strt_amount);
                    cmd.Parameters.AddWithValue("@t_uniprice", strt_uniprice);
                    cmd.Parameters.AddWithValue("@t_vat", strt_vat);
                    cmd.Parameters.AddWithValue("@t_price", strt_price);
                    cmd.Parameters.AddWithValue("@price_kor", strprice_kor);
                    cmd.Parameters.AddWithValue("@price_num", strprice_num);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    // cmd.Parameters.AddWithValue("@submit_codes", sub_codes);
                    // cmd.Parameters.AddWithValue("@submit_items", sub_items);
                    // cmd.Parameters.AddWithValue("@submit_amounts", sub_amounts);
                    // cmd.Parameters.AddWithValue("@submit_uniprices", sub_uniprices);
                    // cmd.Parameters.AddWithValue("@submit_prices", sub_prices);
                    // cmd.Parameters.AddWithValue("@submit_vats", sub_vats);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }



            //[4]
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[5]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
        //}//for문 대괄호 액자,물티슈,컴퓨터 => 데이터 베이스 액자한번 물티슈 한번 컴퓨터 한번 이렇게 저장하는게 이 포문
    }
    //수정
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]제목과 내용 변수
        string strtester    = "";
        string strlangScore = "";

        string strengScore   = "";
        string strmathScore  = "";
        string strtotalScore = "";
        string strpf         = "";



        //[1-1]script
        string strAlert = @"<script>alert('수정했습니다.');location.href='SCM_NoticeView.aspx?SCM_ScoreID="
                          + Request["SCM_ScoreID"]
                          + "';</script>";

        try
        {
            //[2]리플레이스 변환
            strtester    = txttester.Text;
            strlangScore = txtlangScore.Text;

            strengScore   = txtengScore.Text;
            strmathScore  = txtmathScore.Text;
            strtotalScore = txttotalScore.Text;
            strpf         = txtpf.Text;


            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[1]Excute

                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                SqlCommand    cmd = new SqlCommand("UP_ModifySCM_SCORE", con);
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.AddWithValue("@tester", strtester);
                cmd.Parameters.AddWithValue("@langScore", strlangScore);
                cmd.Parameters.AddWithValue("@engScore", strengScore);
                cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                cmd.Parameters.AddWithValue("@pf", strpf);


                cmd.Parameters.AddWithValue("@SCM_ScoreID", Convert.ToInt32(Request["SCM_ScoreID"]));

                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }

            //[2]리디렉트..수차후수정
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[3]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //레이블 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = new DataSet();

        using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
        {
            //[2]Fill
            //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
            ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Order", Convert.ToInt32(Request["SCM_NoticeID"]));


            if (ds.Tables[0].Rows.Count > 0)
            {
                //[3]내용이 길어서.. 출력 오류 날수 있으니..나중에 체크하자..



                lblTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
                lblTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();

                lblps.Text = ds.Tables[0].Rows[0]["ps"].ToString();

                lbltech1.Text  = ds.Tables[0].Rows[0]["tech1"].ToString();
                lblDead1.Text  = ds.Tables[0].Rows[0]["Dead1"].ToString();
                lblcorp1.Text  = ds.Tables[0].Rows[0]["corp1"].ToString();
                lblcode1.Text  = ds.Tables[0].Rows[0]["code1"].ToString();
                lbllang1.Text  = ds.Tables[0].Rows[0]["lang1"].ToString();
                lblsec1.Text   = ds.Tables[0].Rows[0]["sec1"].ToString();
                lblts1.Text    = ds.Tables[0].Rows[0]["ts1"].ToString();
                lblts02.Text   = ds.Tables[0].Rows[0]["ts02"].ToString();
                lblts03.Text   = ds.Tables[0].Rows[0]["ts03"].ToString();
                lblts04.Text   = ds.Tables[0].Rows[0]["ts04"].ToString();
                lblts05.Text   = ds.Tables[0].Rows[0]["ts05"].ToString();
                lblcs1.Text    = ds.Tables[0].Rows[0]["cs1"].ToString();
                lblcs2.Text    = ds.Tables[0].Rows[0]["cs2"].ToString();
                lblcs3.Text    = ds.Tables[0].Rows[0]["cs3"].ToString();
                lblcs4.Text    = ds.Tables[0].Rows[0]["cs4"].ToString();
                lblcs5.Text    = ds.Tables[0].Rows[0]["cs5"].ToString();
                lblqty1.Text   = ds.Tables[0].Rows[0]["qty1"].ToString();
                lblqty2.Text   = ds.Tables[0].Rows[0]["qty2"].ToString();
                lblqty3.Text   = ds.Tables[0].Rows[0]["qty3"].ToString();
                lblqty4.Text   = ds.Tables[0].Rows[0]["qty4"].ToString();
                lblqty5.Text   = ds.Tables[0].Rows[0]["qty5"].ToString();
                lblprice1.Text = ds.Tables[0].Rows[0]["price1"].ToString();
                lblprice2.Text = ds.Tables[0].Rows[0]["price2"].ToString();
                lblprice3.Text = ds.Tables[0].Rows[0]["price3"].ToString();
                lblprice4.Text = ds.Tables[0].Rows[0]["price4"].ToString();
                lblprice5.Text = ds.Tables[0].Rows[0]["price5"].ToString();
                lblvos1.Text   = ds.Tables[0].Rows[0]["vos1"].ToString();
                lblvos2.Text   = ds.Tables[0].Rows[0]["vos2"].ToString();
                lblvos3.Text   = ds.Tables[0].Rows[0]["vos3"].ToString();
                lblvos4.Text   = ds.Tables[0].Rows[0]["vos4"].ToString();
                lblvos5.Text   = ds.Tables[0].Rows[0]["vos5"].ToString();
                lblvat1.Text   = ds.Tables[0].Rows[0]["vat1"].ToString();
                lblvat2.Text   = ds.Tables[0].Rows[0]["vat2"].ToString();
                lblvat3.Text   = ds.Tables[0].Rows[0]["vat3"].ToString();
                lblvat4.Text   = ds.Tables[0].Rows[0]["vat4"].ToString();
                lblvat5.Text   = ds.Tables[0].Rows[0]["vat5"].ToString();

                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();

                if ((lblFileName.Text != null) && (lblFileName.Text != ""))
                {
                    btnFile.Visible = true;
                }
                else
                {
                    btnFile.Visible = false;
                }
            }
            else
            {
                lblNoticeError.Text = "잘못된 요청입니다";
            }
        }
    }
    //수정
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]제목과 내용 변수
        string strproject = "";
        string strdate1   = "";

        string strcustomer  = "";
        string stretc       = "";
        string strperiod1   = "";
        string strdueDate   = "";
        string strlanguage1 = "";
        string strprogress1 = "";
        string strcompany   = "";
        string strcode1     = "";
        string strtodo      = "";
        string strtech      = "";
        string strContent   = "";
        string UpfileName   = "";
        string dbFileName   = lblFileName.Text;



        //[1-1]script
        string strAlert = @"<script>alert('수정했습니다.');location.href='SCM_NoticeView.aspx?SCM_NoticeID="
                          + Request["SCM_NoticeID"]
                          + "';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\notice\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo = new FileInfo(SaveLocation);

            string newUpFile = string.Empty;

            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\notice\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }

            FileUpload1.SaveAs(SaveLocation);
        }


        try
        {
            //[2]리플레이스 변환
            strproject = txtproject.Text;

            strdate1     = txtdate1.Text;
            strcustomer  = txtcustomer.Text;
            stretc       = txtetc.Text;
            strperiod1   = txtperiod1.Text;
            strdueDate   = txtdueDate.Text;
            strprogress1 = txtprogress1.Text;
            strcompany   = txtcompany.Text;
            strcode1     = txtcode1.Text;
            strlanguage1 = txtlanguage1.Text;
            strtodo      = txttodo.Text;
            strtech      = txttech.Text;
            strContent   = txtContent.Text
                           .Replace("\r\n", "<br />");


            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[1]Excute

                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                SqlCommand    cmd = new SqlCommand("UP_ModifySCM_Notice", con);
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.AddWithValue("@project", strproject);
                cmd.Parameters.AddWithValue("@date1", strdate1);
                cmd.Parameters.AddWithValue("@customer", strcustomer);
                cmd.Parameters.AddWithValue("@etc", stretc);
                cmd.Parameters.AddWithValue("@period1", strperiod1);
                cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                cmd.Parameters.AddWithValue("@progress1", strprogress1);
                cmd.Parameters.AddWithValue("@company", strcompany);
                cmd.Parameters.AddWithValue("@code1", strcode1);
                cmd.Parameters.AddWithValue("@language1", strlanguage1);
                cmd.Parameters.AddWithValue("@todo", strtodo);
                cmd.Parameters.AddWithValue("@tech", strtech);
                cmd.Parameters.AddWithValue("@Content", strContent);
                cmd.Parameters.AddWithValue("@upFileName", dbFileName);


                cmd.Parameters.AddWithValue("@SCM_NoticeID", Convert.ToInt32(Request["SCM_NoticeID"]));

                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }

            //[2]리디렉트..수차후수정
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[3]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
Exemple #15
0
    //Submit
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]임시변수
        string strTitle      = "";
        string strtotal1     = "";
        string strsalesdate1 = "";

        string strcompany1 = "";
        string strcompany2 = "";
        string strcompany3 = "";
        string strcompany4 = "";
        string strcompany5 = "";
        string strcompany6 = "";
        string strcompany7 = "";
        string strcompany8 = "";



        string stritem1 = "";
//string strcontent2 = "";
//string strterm = "";
//string strdeadline = "";
        string strvat1      = "";
        string strsalesman1 = "";
        string strea1       = "";
        string strprice1    = "";
        string strsupply1   = "";
        string UpfileName   = "";

        string dbFileName = string.Empty;



        string path = "d:\\_Mobile_System\\joblink\\fileUpload\\Notice\\";


        string strAlert = @"<script>alert('입력했습니다.');location.href='SCM_NoticeList.aspx';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\Notice\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo     = new FileInfo(SaveLocation);
            string   newUpFile = string.Empty;
            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\Notice\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }
            FileUpload1.SaveAs(SaveLocation);
        }



        try
        {
            //[2]변환
            strTitle = txtTitle.Text
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strtotal1 = txttotal1.Text
                        .Replace("&", "&amp;")
                        .Replace("<", "&lt;")
                        .Replace(">", "&gt;")
                        .Replace("\r\n", "<br>")
                        .Replace("\t", "&nbsp;&nbsp;&nbsp;");


            strsalesdate1 = txtsalesdate1.Text;
            stritem1      = txtitem1.Text;
            strcompany1   = txtcompany1.Text;


//strcontent2 = txtcontent2.Text;
//strterm = txtterm.Text;
//strdeadline = txtdeadline.Text;
            strvat1      = txtvat1.Text;
            strsalesman1 = txtsalesman1.Text;
            strea1       = txtea1.Text;
            strprice1    = txtprice1.Text;
            strsupply1   = txtsupply1.Text;



            if (strcompany1 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strcompany2 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strcompany3 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strcompany4 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strcompany5 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }

            if (strcompany6 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strcompany7 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strcompany8 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Sales", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@total1", strtotal1);
                    cmd.Parameters.AddWithValue("@item1", stritem1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@salesdate1", strsalesdate1);
                    cmd.Parameters.AddWithValue("@ea1", strea1);
                    cmd.Parameters.AddWithValue("@company1", strcompany1);
                    //cmd.Parameters.AddWithValue("@content2", strcontent2);
                    //cmd.Parameters.AddWithValue("@term", strterm);
                    //cmd.Parameters.AddWithValue("@deadline", strdeadline);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@salesman1", strsalesman1);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@supply1", strsupply1);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }



            /*
             *           using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
             *           {
             *               SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
             *               SqlCommand cmd = new SqlCommand("UP_AddSCM_Notice", con);
             *
             *               cmd.CommandType = CommandType.StoredProcedure;
             *               cmd.Parameters.AddWithValue("@Title", strTitle);
             *               cmd.Parameters.AddWithValue("@Content", strContent);
             *               cmd.Parameters.AddWithValue("@code1", strcode1);
             *               cmd.Parameters.AddWithValue("@code2", strcode2);
             *               cmd.Parameters.AddWithValue("@code3", strcode3);
             *               cmd.Parameters.AddWithValue("@code4", strcode4);
             *               cmd.Parameters.AddWithValue("@code5", strcode5);
             *
             *
             * cmd.Parameters.AddWithValue("@upFileName", dbFileName);
             * cmd.Parameters.AddWithValue("@upFileName2", dbFileName2);
             * cmd.Parameters.AddWithValue("@upFileName3", dbFileName3);
             * cmd.Parameters.AddWithValue("@upFileName4", dbFileName4);
             * cmd.Parameters.AddWithValue("@upFileName5", dbFileName5);
             *
             *
             *
             * cmd.Parameters.AddWithValue("@ps", strps);
             * cmd.Parameters.AddWithValue("@ts1", strts1);
             * cmd.Parameters.AddWithValue("@ts2", strts2);
             * cmd.Parameters.AddWithValue("@ts3", strts3);
             * cmd.Parameters.AddWithValue("@ts4", strts4);
             * cmd.Parameters.AddWithValue("@ts5", strts5);
             *
             * cmd.Parameters.AddWithValue("@cs1", strcs1);
             * cmd.Parameters.AddWithValue("@cs2", strcs2);
             * cmd.Parameters.AddWithValue("@cs3", strcs3);
             * cmd.Parameters.AddWithValue("@cs4", strcs4);
             * cmd.Parameters.AddWithValue("@cs5", strcs5);
             *
             *
             * cmd.Parameters.AddWithValue("@link1", strlink1);
             * cmd.Parameters.AddWithValue("@link2", strlink2);
             * cmd.Parameters.AddWithValue("@link3", strlink3);
             * cmd.Parameters.AddWithValue("@link4", strlink4);
             * cmd.Parameters.AddWithValue("@link5", strlink5);
             *
             * cmd.Parameters.AddWithValue("@Dead1", strDead1);
             * cmd.Parameters.AddWithValue("@Dead2", strDead2);
             * cmd.Parameters.AddWithValue("@Dead3", strDead3);
             * cmd.Parameters.AddWithValue("@Dead4", strDead4);
             * cmd.Parameters.AddWithValue("@Dead5", strDead5);
             *
             * cmd.Parameters.AddWithValue("@Progress1", strProgress1);
             * cmd.Parameters.AddWithValue("@Progress2", strProgress2);
             * cmd.Parameters.AddWithValue("@Progress3", strProgress3);
             * cmd.Parameters.AddWithValue("@Progress4", strProgress4);
             * cmd.Parameters.AddWithValue("@Progress5", strProgress5);
             *
             * cmd.Parameters.AddWithValue("@corp1", strcorp1);
             * cmd.Parameters.AddWithValue("@corp2", strcorp2);
             * cmd.Parameters.AddWithValue("@corp3", strcorp3);
             * cmd.Parameters.AddWithValue("@corp4", strcorp4);
             * cmd.Parameters.AddWithValue("@corp5", strcorp5);
             *
             * con.Open();
             *               cmd.ExecuteNonQuery();
             *               con.Close();
             *           }
             */

            //[4]
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[5]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //Submit
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]임시변수
        string strtester    = "";
        string strlangScore = "";
        string strmathScore = "";

        string strpf  = "";
        string strts2 = "";
        string strts3 = "";
        string strts4 = "";
        string strts5 = "";
        string strts6 = "";
        string strts7 = "";
        string strts8 = "";


        string strengScore   = "";
        string strtotalScore = "";

        string dbFileName = string.Empty;



        string path = "d:\\_Mobile_System\\joblink\\fileUpload\\Notice\\";


        string strAlert = @"<script>alert('입력했습니다.');location.href='SCM_NoticeList.aspx';</script>";


        try
        {
            //[2]변환
            strtester = txttester.Text
                        .Replace("&", "&amp;")
                        .Replace("<", "&lt;")
                        .Replace(">", "&gt;")
                        .Replace("\r\n", "<br>")
                        .Replace("\t", "&nbsp;&nbsp;&nbsp;");


            strlangScore  = txtlangScore.Text;
            strengScore   = txtengScore.Text;
            strmathScore  = txtmathScore.Text;
            strtotalScore = txttotalScore.Text;
            strpf         = txtpf.Text;



            if (strpf != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts2 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts3 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts4 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts5 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }

            if (strts6 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strts7 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strts8 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_SCORE", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@tester", strtester);
                    cmd.Parameters.AddWithValue("@langScore", strlangScore);
                    cmd.Parameters.AddWithValue("@engScore", strengScore);
                    cmd.Parameters.AddWithValue("@mathScore", strmathScore);
                    cmd.Parameters.AddWithValue("@totalScore", strtotalScore);
                    cmd.Parameters.AddWithValue("@pf", strpf);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }



            /*
             *           using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
             *           {
             *               SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
             *               SqlCommand cmd = new SqlCommand("UP_AddSCM_Notice", con);
             *
             *               cmd.CommandType = CommandType.StoredProcedure;
             *               cmd.Parameters.AddWithValue("@tester", strtester);
             *               cmd.Parameters.AddWithValue("@langScore", strlangScore);
             *               cmd.Parameters.AddWithValue("@engScore", strengScore);
             *               cmd.Parameters.AddWithValue("@code2", strcode2);
             *               cmd.Parameters.AddWithValue("@code3", strcode3);
             *               cmd.Parameters.AddWithValue("@code4", strcode4);
             *               cmd.Parameters.AddWithValue("@code5", strcode5);
             *
             *
             * cmd.Parameters.AddWithValue("@upFileName", dbFileName);
             * cmd.Parameters.AddWithValue("@upFileName2", dbFileName2);
             * cmd.Parameters.AddWithValue("@upFileName3", dbFileName3);
             * cmd.Parameters.AddWithValue("@upFileName4", dbFileName4);
             * cmd.Parameters.AddWithValue("@upFileName5", dbFileName5);
             *
             *
             *
             * cmd.Parameters.AddWithValue("@mathScore", strmathScore);
             * cmd.Parameters.AddWithValue("@pf", strpf);
             * cmd.Parameters.AddWithValue("@ts2", strts2);
             * cmd.Parameters.AddWithValue("@ts3", strts3);
             * cmd.Parameters.AddWithValue("@ts4", strts4);
             * cmd.Parameters.AddWithValue("@ts5", strts5);
             *
             * cmd.Parameters.AddWithValue("@cs1", strcs1);
             * cmd.Parameters.AddWithValue("@cs2", strcs2);
             * cmd.Parameters.AddWithValue("@cs3", strcs3);
             * cmd.Parameters.AddWithValue("@cs4", strcs4);
             * cmd.Parameters.AddWithValue("@cs5", strcs5);
             *
             *
             * cmd.Parameters.AddWithValue("@link1", strlink1);
             * cmd.Parameters.AddWithValue("@link2", strlink2);
             * cmd.Parameters.AddWithValue("@link3", strlink3);
             * cmd.Parameters.AddWithValue("@link4", strlink4);
             * cmd.Parameters.AddWithValue("@link5", strlink5);
             *
             * cmd.Parameters.AddWithValue("@Dead1", strDead1);
             * cmd.Parameters.AddWithValue("@Dead2", strDead2);
             * cmd.Parameters.AddWithValue("@Dead3", strDead3);
             * cmd.Parameters.AddWithValue("@Dead4", strDead4);
             * cmd.Parameters.AddWithValue("@Dead5", strDead5);
             *
             * cmd.Parameters.AddWithValue("@Progress1", strProgress1);
             * cmd.Parameters.AddWithValue("@Progress2", strProgress2);
             * cmd.Parameters.AddWithValue("@Progress3", strProgress3);
             * cmd.Parameters.AddWithValue("@Progress4", strProgress4);
             * cmd.Parameters.AddWithValue("@Progress5", strProgress5);
             *
             * cmd.Parameters.AddWithValue("@corp1", strcorp1);
             * cmd.Parameters.AddWithValue("@corp2", strcorp2);
             * cmd.Parameters.AddWithValue("@corp3", strcorp3);
             * cmd.Parameters.AddWithValue("@corp4", strcorp4);
             * cmd.Parameters.AddWithValue("@corp5", strcorp5);
             *
             * con.Open();
             *               cmd.ExecuteNonQuery();
             *               con.Close();
             *           }
             */

            //[4]
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[5]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
Exemple #17
0
    //수정
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]제목과 내용 변수
        string UpfileName    = ""; // 이 부분은 데이터 베이스에 추가가 되는부분 ,포문 안에 있으니깐 리스트 길이 만큼 반복->이것도 예전꺼
        string dbFileName    = string.Empty;
        string strserial_num = "";
        string strdue_date   = "";

        string strc_num      = "";
        string strc_name     = "";
        string strc_leader   = "";
        string strc_address  = "";
        string strc_charge   = "";
        string strc_phonenum = "";

        string strcode     = "";
        string stritem     = "";
        string stramount   = "";
        string struniprice = "";
        string strprice    = "";
        string strvat      = "";

        string strt_amount   = "";
        string strt_uniprice = "";
        string strt_price    = "";
        string strt_vat      = "";

        string strprice_kor = "";
        string strprice_num = "";


        //[1-1]script
        string strAlert = @"<script>alert('수정했습니다.');location.href='SCM_NoticeView.aspx?SCM_OrderID="
                          + Request["SCM_OrderID"]
                          + "';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\Order\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo = new FileInfo(SaveLocation);

            string newUpFile = string.Empty;

            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\Order\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }

            FileUpload1.SaveAs(SaveLocation);
        }


        try
        {
            //[2]리플레이스 변환
            strserial_num = txtserial_num.Text
                            .Replace("&", "&amp;")
                            .Replace("<", "&lt;")
                            .Replace(">", "&gt;")
                            .Replace("\r\n", "<br>")
                            .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strdue_date = txtdue_date.Text
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_num = txtc_num.Text
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_name = txtc_name.Text
                        .Replace("&", "&amp;")
                        .Replace("<", "&lt;")
                        .Replace(">", "&gt;")
                        .Replace("\r\n", "<br>")
                        .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_leader = txtc_leader.Text
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_address = txtc_address.Text
                           .Replace("&", "&amp;")
                           .Replace("<", "&lt;")
                           .Replace(">", "&gt;")
                           .Replace("\r\n", "<br>")
                           .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_charge = txtc_charge.Text
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strc_phonenum = txtc_phonenum.Text
                            .Replace("&", "&amp;")
                            .Replace("<", "&lt;")
                            .Replace(">", "&gt;")
                            .Replace("\r\n", "<br>")
                            .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strcode = submit_codes.Text //list_codes[i] // 이 끝부분에 i= 0~리스트 길이 만큼의 리스트 항목을 반환 =>['물티슈','액자','노트북'] 처음에는 물티슈로 디비에 저장
                                        // 두번쨰는 액자로 저장
                      .Replace("&", "&amp;")
                      .Replace("<", "&lt;")
                      .Replace(">", "&gt;")
                      .Replace("\r\n", "<br>")
                      .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            stritem = submit_items.Text // list_items[i]
                      .Replace("&", "&amp;")
                      .Replace("<", "&lt;")
                      .Replace(">", "&gt;")
                      .Replace("\r\n", "<br>")
                      .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            stramount = submit_amounts.Text //list_amounts[i]
                        .Replace("&", "&amp;")
                        .Replace("<", "&lt;")
                        .Replace(">", "&gt;")
                        .Replace("\r\n", "<br>")
                        .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            struniprice = submit_uniprices.Text//list_uniprices[i]
                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strprice = submit_prices.Text //list_prices[i]
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strvat = submit_vats.Text//list_vats[i]
                     .Replace("&", "&amp;")
                     .Replace("<", "&lt;")
                     .Replace(">", "&gt;")
                     .Replace("\r\n", "<br>")
                     .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_amount = txtt_amount.Text

                          .Replace("&", "&amp;")
                          .Replace("<", "&lt;")
                          .Replace(">", "&gt;")
                          .Replace("\r\n", "<br>")
                          .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_uniprice = txtt_uniprice.Text
                            .Replace("&", "&amp;")
                            .Replace("<", "&lt;")
                            .Replace(">", "&gt;")
                            .Replace("\r\n", "<br>")
                            .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_price = txtt_price.Text
                         .Replace("&", "&amp;")
                         .Replace("<", "&lt;")
                         .Replace(">", "&gt;")
                         .Replace("\r\n", "<br>")
                         .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strt_vat = txtt_vat.Text
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strprice_kor = txtprice_kor.Text
                           .Replace("&", "&amp;")
                           .Replace("<", "&lt;")
                           .Replace(">", "&gt;")
                           .Replace("\r\n", "<br>")
                           .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strprice_num = txtprice_num.Text
                           .Replace("&", "&amp;")
                           .Replace("<", "&lt;")
                           .Replace(">", "&gt;")
                           .Replace("\r\n", "<br>")
                           .Replace("\t", "&nbsp;&nbsp;&nbsp;");



            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[1]Excute

                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                SqlCommand    cmd = new SqlCommand("UP_ModifySCM_Order", con);
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.AddWithValue("@serial_num", strserial_num);
                cmd.Parameters.AddWithValue("@due_date", strdue_date);
                cmd.Parameters.AddWithValue("@c_num", strc_num);
                cmd.Parameters.AddWithValue("@c_name", strc_name);
                cmd.Parameters.AddWithValue("@c_leader", strc_leader);
                cmd.Parameters.AddWithValue("@c_address", strc_address);
                cmd.Parameters.AddWithValue("@c_charge", strc_charge);
                cmd.Parameters.AddWithValue("@c_phonenum", strc_phonenum);
                cmd.Parameters.AddWithValue("@code", strcode);
                cmd.Parameters.AddWithValue("@item", stritem);
                cmd.Parameters.AddWithValue("@amount", stramount);
                cmd.Parameters.AddWithValue("@uniprice", struniprice);
                cmd.Parameters.AddWithValue("@price", strprice);
                cmd.Parameters.AddWithValue("@vat", strvat);
                cmd.Parameters.AddWithValue("@t_amount", strt_amount);
                cmd.Parameters.AddWithValue("@t_uniprice", strt_uniprice);
                cmd.Parameters.AddWithValue("@t_vat", strt_vat);
                cmd.Parameters.AddWithValue("@t_price", strt_price);
                cmd.Parameters.AddWithValue("@price_kor", strprice_kor);
                cmd.Parameters.AddWithValue("@price_num", strprice_num);
                cmd.Parameters.AddWithValue("@upFileName", dbFileName);


                cmd.Parameters.AddWithValue("@SCM_OrderID", Convert.ToInt32(Request["SCM_OrderID"]));

                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }

            //[2]리디렉트..수차후수정
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[3]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //레이블 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = new DataSet();

        using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
        {
            //[2]Fill
            //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
            ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Order", Convert.ToInt32(Request["SCM_OrderID"]));


            if (ds.Tables[0].Rows.Count > 0)
            {
                //[3]내용이 길어서.. 출력 오류 날수 있으니..나중에 체크하자..

                lblserial_num.Text = ds.Tables[0].Rows[0]["serial_num"].ToString()
                                     .Replace("\r\n", "<br />");

                lbldue_date.Text = ds.Tables[0].Rows[0]["due_date"].ToString();
                lblc_num.Text    = ds.Tables[0].Rows[0]["c_num"].ToString();

                lblc_name.Text    = ds.Tables[0].Rows[0]["c_name"].ToString();
                lblc_leader.Text  = ds.Tables[0].Rows[0]["c_leader"].ToString();
                lblc_address.Text = ds.Tables[0].Rows[0]["c_address"].ToString()
                                    .Replace("\r\n", "<br />");

                lblc_charge.Text   = ds.Tables[0].Rows[0]["c_charge"].ToString();
                lblc_phonenum.Text = ds.Tables[0].Rows[0]["c_phonenum"].ToString();
                lblcode.Text       = ds.Tables[0].Rows[0]["code"].ToString();
                lblitem.Text       = ds.Tables[0].Rows[0]["item"].ToString();
                lblamount.Text     = ds.Tables[0].Rows[0]["amount"].ToString();
                lbluniprice.Text   = ds.Tables[0].Rows[0]["uniprice"].ToString();
                lblprice.Text      = ds.Tables[0].Rows[0]["price"].ToString();
                lblvat.Text        = ds.Tables[0].Rows[0]["vat"].ToString();
                lblt_amount.Text   = ds.Tables[0].Rows[0]["t_amount"].ToString()
                                     .Replace("\r\n", "<br />");
                lblt_uniprice.Text = ds.Tables[0].Rows[0]["t_uniprice"].ToString();
                lblt_vat.Text      = ds.Tables[0].Rows[0]["t_vat"].ToString();
                lblt_price.Text    = ds.Tables[0].Rows[0]["t_price"].ToString();
                lblprice_kor.Text  = ds.Tables[0].Rows[0]["price_kor"].ToString();
                lblprice_num.Text  = ds.Tables[0].Rows[0]["price_num"].ToString();
                lblPostDate.Text   = ds.Tables[0].Rows[0]["PostDate"].ToString().Substring(0, 10);
                lblReadCount.Text  = ds.Tables[0].Rows[0]["ReadCount"].ToString()
                                     .Replace("\r\n", "<br />");
                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();

                if ((lblFileName.Text != null) && (lblFileName.Text != ""))
                {
                    btnFile.Visible = true;
                }
                else
                {
                    btnFile.Visible = false;
                }
            }
            else
            {
                lblNoticeError.Text = "잘못된 요청입니다";
            }
        }
    }
    //[5]삭제
    protected void btnDelete_Click(object sender, ImageClickEventArgs e)
    {
        //[1]임시변수
        int    intTemp  = 0;
        string strAlert = @"<script>alert('삭제되었습니다.');location.href='SCM_NoticeList.aspx';</script>";

        try
        {
            for (int j = 0; j < ctlNoticeList.Rows.Count; j++)
            {
                CheckBox chkBox = (CheckBox)ctlNoticeList.Rows[j].FindControl("chk");

                if (chkBox.Checked)
                {
                    #region 삭제
                    //[2]Find
                    for (int i = 0; i < ctlNoticeList.Rows.Count; i++)
                    {
                        CheckBox check = (CheckBox)ctlNoticeList.Rows[i].FindControl("chk");

                        if (check.Checked)
                        {
                            //[3]SCM_noticeID
                            intTemp = Convert.ToInt32(ctlNoticeList.Rows[i].Cells[0].Text);

                            using (Is.Notice.Bsl.Notice_RTx rBsl = new Is.Notice.Bsl.Notice_RTx())
                            {
                                //[4]Delete
                                SqlConnection con = new SqlConnection(
                                    ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                                SqlCommand cmd = new SqlCommand("UP_DeleteSCM_Sales", con);
                                cmd.CommandType = CommandType.StoredProcedure;

                                cmd.Parameters.AddWithValue("@SCM_SalesID", intTemp);

                                con.Open();
                                cmd.ExecuteNonQuery();
                                con.Close();
                            }
                        }

                        //[5]변수 초기화
                        intTemp = 0;
                    }

                    //[6]script
                    Page.RegisterStartupScript("EndScript", strAlert);
                    #endregion
                }
                else
                {
                    lblError.Text = "삭제할 항목을 선택하세요";
                }
            }
        }
        catch (Exception err)
        {
            //[7]Exception
            //Response.Write(err.Source + " : " + err.Message);
        }
    }
    //Submit
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]임시변수
        string strproject = "";
        string strContent = "";
        string strdate1   = "";

        string strcustomer = "";
        string strts2      = "";
        string strts3      = "";
        string strts4      = "";
        string strts5      = "";
        string strts6      = "";
        string strts7      = "";
        string strts8      = "";



        string strcode1     = "";
        string stretc       = "";
        string strperiod1   = "";
        string strdueDate   = "";
        string strprogress1 = "";
        string strcompany   = "";
        string strlanguage1 = "";
        string strtodo      = "";
        string strtech      = "";
        string UpfileName   = "";

        string dbFileName = string.Empty;



        string path = "d:\\_Mobile_System\\joblink\\fileUpload\\Notice\\";


        string strAlert = @"<script>alert('입력했습니다.');location.href='SCM_NoticeList.aspx';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\Notice\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo     = new FileInfo(SaveLocation);
            string   newUpFile = string.Empty;
            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\Notice\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }
            FileUpload1.SaveAs(SaveLocation);
        }



        try
        {
            //[2]변환
            strproject = txtproject.Text
                         .Replace("&", "&amp;")
                         .Replace("<", "&lt;")
                         .Replace(">", "&gt;")
                         .Replace("\r\n", "<br>")
                         .Replace("\t", "&nbsp;&nbsp;&nbsp;");

            strContent = txtContent.Text
                         .Replace("&", "&amp;")
                         .Replace("<", "&lt;")
                         .Replace(">", "&gt;")
                         .Replace("\r\n", "<br>")
                         .Replace("\t", "&nbsp;&nbsp;&nbsp;");


            strdate1    = txtdate1.Text;
            strcode1    = txtcode1.Text;
            strcustomer = txtcustomer.Text;


            stretc       = txtetc.Text;
            strperiod1   = txtperiod1.Text;
            strdueDate   = txtdueDate.Text;
            strprogress1 = txtprogress1.Text;
            strcompany   = txtcompany.Text;
            strlanguage1 = txtlanguage1.Text;
            strtodo      = txttodo.Text;
            strtech      = txttech.Text;



            if (strcustomer != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts2 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts3 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts4 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts5 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }

            if (strts6 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strts7 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strts8 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Notice", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@project", strproject);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@date1", strdate1);
                    cmd.Parameters.AddWithValue("@language1", strlanguage1);
                    cmd.Parameters.AddWithValue("@customer", strcustomer);
                    cmd.Parameters.AddWithValue("@etc", stretc);
                    cmd.Parameters.AddWithValue("@period1", strperiod1);
                    cmd.Parameters.AddWithValue("@dueDate", strdueDate);
                    cmd.Parameters.AddWithValue("@progress1", strprogress1);
                    cmd.Parameters.AddWithValue("@company", strcompany);
                    cmd.Parameters.AddWithValue("@todo", strtodo);
                    cmd.Parameters.AddWithValue("@tech", strtech);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }



            /*
             *           using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
             *           {
             *               SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
             *               SqlCommand cmd = new SqlCommand("UP_AddSCM_Notice", con);
             *
             *               cmd.CommandType = CommandType.StoredProcedure;
             *               cmd.Parameters.AddWithValue("@project", strproject);
             *               cmd.Parameters.AddWithValue("@Content", strContent);
             *               cmd.Parameters.AddWithValue("@code1", strcode1);
             *               cmd.Parameters.AddWithValue("@code2", strcode2);
             *               cmd.Parameters.AddWithValue("@code3", strcode3);
             *               cmd.Parameters.AddWithValue("@code4", strcode4);
             *               cmd.Parameters.AddWithValue("@code5", strcode5);
             *
             *
             * cmd.Parameters.AddWithValue("@upFileName", dbFileName);
             * cmd.Parameters.AddWithValue("@upFileName2", dbFileName2);
             * cmd.Parameters.AddWithValue("@upFileName3", dbFileName3);
             * cmd.Parameters.AddWithValue("@upFileName4", dbFileName4);
             * cmd.Parameters.AddWithValue("@upFileName5", dbFileName5);
             *
             *
             *
             * cmd.Parameters.AddWithValue("@date1", strdate1);
             * cmd.Parameters.AddWithValue("@customer", strcustomer);
             * cmd.Parameters.AddWithValue("@ts2", strts2);
             * cmd.Parameters.AddWithValue("@ts3", strts3);
             * cmd.Parameters.AddWithValue("@ts4", strts4);
             * cmd.Parameters.AddWithValue("@ts5", strts5);
             *
             * cmd.Parameters.AddWithValue("@etc", stretc);
             * cmd.Parameters.AddWithValue("@cs2", strcs2);
             * cmd.Parameters.AddWithValue("@cs3", strcs3);
             * cmd.Parameters.AddWithValue("@cs4", strcs4);
             * cmd.Parameters.AddWithValue("@cs5", strcs5);
             *
             *
             * cmd.Parameters.AddWithValue("@period1", strperiod1);
             * cmd.Parameters.AddWithValue("@link2", strlink2);
             * cmd.Parameters.AddWithValue("@link3", strlink3);
             * cmd.Parameters.AddWithValue("@link4", strlink4);
             * cmd.Parameters.AddWithValue("@link5", strlink5);
             *
             * cmd.Parameters.AddWithValue("@dueDate", strdueDate);
             * cmd.Parameters.AddWithValue("@Dead2", strDead2);
             * cmd.Parameters.AddWithValue("@Dead3", strDead3);
             * cmd.Parameters.AddWithValue("@Dead4", strDead4);
             * cmd.Parameters.AddWithValue("@Dead5", strDead5);
             *
             * cmd.Parameters.AddWithValue("@progress1", strprogress1);
             * cmd.Parameters.AddWithValue("@Progress2", strProgress2);
             * cmd.Parameters.AddWithValue("@Progress3", strProgress3);
             * cmd.Parameters.AddWithValue("@Progress4", strProgress4);
             * cmd.Parameters.AddWithValue("@Progress5", strProgress5);
             *
             * cmd.Parameters.AddWithValue("@company", strcompany);
             * cmd.Parameters.AddWithValue("@corp2", strcorp2);
             * cmd.Parameters.AddWithValue("@corp3", strcorp3);
             * cmd.Parameters.AddWithValue("@corp4", strcorp4);
             * cmd.Parameters.AddWithValue("@corp5", strcorp5);
             *
             * con.Open();
             *               cmd.ExecuteNonQuery();
             *               con.Close();
             *           }
             */

            //[4]
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[5]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //텍스트 박스 바인딩
    private void DisplayData()
    {
        //[1]dataset
        DataSet ds = null;

        try
        {
            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[2]Fill
                //  ds = bsl.ViewNotice(Convert.ToInt32(Request["NoticeID"]));
                ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString, "UP_ViewSCM_Order", Convert.ToInt32(Request["SCM_NoticeID"]));

                //[3]Bind
                txtTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
                txtps.Text    = ds.Tables[0].Rows[0]["ps"].ToString();
                txtts1.Text   = ds.Tables[0].Rows[0]["ts1"].ToString();
                txtcs1.Text   = ds.Tables[0].Rows[0]["cs1"].ToString();

                txtlang1.Text   = ds.Tables[0].Rows[0]["lang1"].ToString();
                txtDead1.Text   = ds.Tables[0].Rows[0]["Dead1"].ToString();
                txtcode1.Text   = ds.Tables[0].Rows[0]["code1"].ToString();
                txtContent.Text = ds.Tables[0].Rows[0]["Content"].ToString()
                                  .Replace("\r\n", "<br />");
                txtts02.Text     = ds.Tables[0].Rows[0]["ts02"].ToString();
                txtts03.Text     = ds.Tables[0].Rows[0]["ts03"].ToString();
                txtts04.Text     = ds.Tables[0].Rows[0]["ts04"].ToString();
                txtts05.Text     = ds.Tables[0].Rows[0]["ts05"].ToString();
                txtcs2.Text      = ds.Tables[0].Rows[0]["cs2"].ToString();
                txtcs3.Text      = ds.Tables[0].Rows[0]["cs3"].ToString();
                txtcs4.Text      = ds.Tables[0].Rows[0]["cs4"].ToString();
                txtcs5.Text      = ds.Tables[0].Rows[0]["cs5"].ToString();
                txtqty1.Text     = ds.Tables[0].Rows[0]["qty1"].ToString();
                txtqty2.Text     = ds.Tables[0].Rows[0]["qty2"].ToString();
                txtqty3.Text     = ds.Tables[0].Rows[0]["qty3"].ToString();
                txtqty4.Text     = ds.Tables[0].Rows[0]["qty4"].ToString();
                txtqty5.Text     = ds.Tables[0].Rows[0]["qty5"].ToString();
                txtprice1.Text   = ds.Tables[0].Rows[0]["price1"].ToString();
                txtprice2.Text   = ds.Tables[0].Rows[0]["price2"].ToString();
                txtprice3.Text   = ds.Tables[0].Rows[0]["price3"].ToString();
                txtprice4.Text   = ds.Tables[0].Rows[0]["price4"].ToString();
                txtprice5.Text   = ds.Tables[0].Rows[0]["price5"].ToString();
                txtvos1.Text     = ds.Tables[0].Rows[0]["vos1"].ToString();
                txtvos2.Text     = ds.Tables[0].Rows[0]["vos2"].ToString();
                txtvos3.Text     = ds.Tables[0].Rows[0]["vos3"].ToString();
                txtvos4.Text     = ds.Tables[0].Rows[0]["vos4"].ToString();
                txtvos5.Text     = ds.Tables[0].Rows[0]["vos5"].ToString();
                txtvos1.Text     = ds.Tables[0].Rows[0]["vat1"].ToString();
                txtvos2.Text     = ds.Tables[0].Rows[0]["vat2"].ToString();
                txtvos3.Text     = ds.Tables[0].Rows[0]["vat3"].ToString();
                txtvos4.Text     = ds.Tables[0].Rows[0]["vat4"].ToString();
                txtvos5.Text     = ds.Tables[0].Rows[0]["vat5"].ToString();
                lblFileName.Text = ds.Tables[0].Rows[0]["UpFileName"].ToString();
            }
        }
        catch (Exception err)
        {
            //[4]예외
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //수정
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]제목과 내용 변수
        string strTitle = "";
        string strps    = "";

        string strwt1     = "";
        string strContent = "";
        string UpfileName = "";
        string dbFileName = lblFileName.Text;



        //[1-1]script
        string strAlert = @"<script>alert('수정했습니다.');location.href='SCM_NoticeView.aspx?SCM_NewsID="
                          + Request["SCM_NewsID"]
                          + "';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\notice\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo = new FileInfo(SaveLocation);

            string newUpFile = string.Empty;

            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\notice\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }

            FileUpload1.SaveAs(SaveLocation);
        }


        try
        {
            //[2]리플레이스 변환
            strTitle   = txtTitle.Text;
            strContent = txtContent.Text;
            strwt1     = txtwt1.Text;


            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[1]Excute

                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                SqlCommand    cmd = new SqlCommand("UP_ModifySCM_ETRI", con);
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.AddWithValue("@Title", strTitle);
                cmd.Parameters.AddWithValue("@wt1", strwt1)
                ;
                cmd.Parameters.AddWithValue("@Content", strContent);
                cmd.Parameters.AddWithValue("@upFileName", dbFileName);


                cmd.Parameters.AddWithValue("@SCM_NewsID", Convert.ToInt32(Request["SCM_NewsID"]));

                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }

            //[2]리디렉트..수차후수정
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[3]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
Exemple #23
0
    //Submit
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]임시변수
        string strTitle   = "";
        string strContent = "";
        string strps      = "";

        string strts1 = "";
        string strts2 = "";
        string strts3 = "";
        string strts4 = "";
        string strts5 = "";
        string strts6 = "";
        string strts7 = "";
        string strts8 = "";



        string strcode1  = "";
        string strcs1    = "";
        string strlink1  = "";
        string strDead1  = "";
        string strcorp1  = "";
        string strlang1  = "";
        string strsec1   = "";
        string strtech1  = "";
        string strts02   = "";
        string strts03   = "";
        string strts04   = "";
        string strts05   = "";
        string strcs2    = "";
        string strcs3    = "";
        string strcs4    = "";
        string strcs5    = "";
        string strqty1   = "";
        string strqty2   = "";
        string strqty3   = "";
        string strqty4   = "";
        string strqty5   = "";
        string strprice1 = "";
        string strprice2 = "";
        string strprice3 = "";
        string strprice4 = "";
        string strprice5 = "";
        string strvos1   = "";
        string strvos2   = "";
        string strvos3   = "";
        string strvos4   = "";
        string strvos5   = "";
        string strvat1   = "";
        string strvat2   = "";
        string strvat3   = "";
        string strvat4   = "";
        string strvat5   = "";



        string UpfileName = "";

        string dbFileName = string.Empty;



        string path = "d:\\_Mobile_System\\joblink\\fileUpload\\Notice\\";


        string strAlert = @"<script>alert('입력했습니다.');location.href='SCM_NoticeList.aspx';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\Notice\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo     = new FileInfo(SaveLocation);
            string   newUpFile = string.Empty;
            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\Notice\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }
            FileUpload1.SaveAs(SaveLocation);
        }



        try
        {
            //[2]변환
            strTitle = txtTitle.Text
                       .Replace("&", "&amp;")
                       .Replace("<", "&lt;")
                       .Replace(">", "&gt;")
                       .Replace("\r\n", "<br>")
                       .Replace("\t", "&nbsp;&nbsp;&nbsp;");



            strps    = txtps.Text;
            strcode1 = txtcode1.Text;
            strts1   = txtts1.Text;


            strcs1   = txtcs1.Text;
            strlink1 = txtlink1.Text;
            strDead1 = txtDead1.Text;

            strcorp1  = txtcorp1.Text;
            strlang1  = txtlang1.Text;
            strsec1   = txtsec1.Text;
            strtech1  = txttech1.Text;
            strts02   = txtts02.Text;
            strts03   = txtts03.Text;
            strts04   = txtts04.Text;
            strts05   = txtts05.Text;
            strcs2    = txtcs2.Text;
            strcs3    = txtcs3.Text;
            strcs4    = txtcs4.Text;
            strcs5    = txtcs5.Text;
            strqty1   = txtqty1.Text;
            strqty2   = txtqty2.Text;
            strqty3   = txtqty3.Text;
            strqty4   = txtqty4.Text;
            strqty5   = txtqty5.Text;
            strprice1 = txtprice1.Text;
            strprice2 = txtprice2.Text;
            strprice3 = txtprice3.Text;
            strprice4 = txtprice4.Text;
            strprice5 = txtprice5.Text;
            strvos1   = txtvos1.Text;
            strvos2   = txtvos2.Text;
            strvos3   = txtvos3.Text;
            strvos4   = txtvos4.Text;
            strvos5   = txtvos5.Text;
            strvat1   = txtvat1.Text;
            strvat2   = txtvat2.Text;
            strvat3   = txtvat3.Text;
            strvat4   = txtvat4.Text;
            strvat5   = txtvat5.Text;



            if (strts1 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);



                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts2 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts3 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts4 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }
            if (strts5 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }

            if (strts6 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strts7 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }


            if (strts8 != "")
            {
                using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                    SqlCommand    cmd = new SqlCommand("UP_AddSCM_Order", con);

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Title", strTitle);
                    cmd.Parameters.AddWithValue("@Content", strContent);
                    cmd.Parameters.AddWithValue("@code1", strcode1);
                    cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                    cmd.Parameters.AddWithValue("@ps", strps);
                    cmd.Parameters.AddWithValue("@lang1", strlang1);
                    cmd.Parameters.AddWithValue("@ts1", strts1);
                    cmd.Parameters.AddWithValue("@cs1", strcs1);
                    cmd.Parameters.AddWithValue("@link1", strlink1);
                    cmd.Parameters.AddWithValue("@Dead1", strDead1);
                    cmd.Parameters.AddWithValue("@corp1", strcorp1);
                    cmd.Parameters.AddWithValue("@sec1", strsec1);
                    cmd.Parameters.AddWithValue("@tech1", strtech1);
                    cmd.Parameters.AddWithValue("@ts02", strts02);
                    cmd.Parameters.AddWithValue("@ts03", strts03);
                    cmd.Parameters.AddWithValue("@ts04", strts04);
                    cmd.Parameters.AddWithValue("@ts05", strts05);
                    cmd.Parameters.AddWithValue("@cs2", strcs2);
                    cmd.Parameters.AddWithValue("@cs3", strcs3);
                    cmd.Parameters.AddWithValue("@cs4", strcs4);
                    cmd.Parameters.AddWithValue("@cs5", strcs5);
                    cmd.Parameters.AddWithValue("@qty1", strqty1);
                    cmd.Parameters.AddWithValue("@qty2", strqty2);
                    cmd.Parameters.AddWithValue("@qty3", strqty3);
                    cmd.Parameters.AddWithValue("@qty4", strqty4);
                    cmd.Parameters.AddWithValue("@qty5", strqty5);
                    cmd.Parameters.AddWithValue("@price1", strprice1);
                    cmd.Parameters.AddWithValue("@price2", strprice2);
                    cmd.Parameters.AddWithValue("@price3", strprice3);
                    cmd.Parameters.AddWithValue("@price4", strprice4);
                    cmd.Parameters.AddWithValue("@price5", strprice5);
                    cmd.Parameters.AddWithValue("@vos1", strvos1);
                    cmd.Parameters.AddWithValue("@vos2", strvos2);
                    cmd.Parameters.AddWithValue("@vos3", strvos3);
                    cmd.Parameters.AddWithValue("@vos4", strvos4);
                    cmd.Parameters.AddWithValue("@vos5", strvos5);
                    cmd.Parameters.AddWithValue("@vat1", strvat1);
                    cmd.Parameters.AddWithValue("@vat2", strvat2);
                    cmd.Parameters.AddWithValue("@vat3", strvat3);
                    cmd.Parameters.AddWithValue("@vat4", strvat4);
                    cmd.Parameters.AddWithValue("@vat5", strvat5);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }
            }



            /*
             *           using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
             *           {
             *               SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
             *               SqlCommand cmd = new SqlCommand("UP_AddSCM_Order", con);
             *
             *               cmd.CommandType = CommandType.StoredProcedure;
             *               cmd.Parameters.AddWithValue("@Title", strTitle);
             *               cmd.Parameters.AddWithValue("@Content", strContent);
             *               cmd.Parameters.AddWithValue("@code1", strcode1);
             *               cmd.Parameters.AddWithValue("@code2", strcode2);
             *               cmd.Parameters.AddWithValue("@code3", strcode3);
             *               cmd.Parameters.AddWithValue("@code4", strcode4);
             *               cmd.Parameters.AddWithValue("@code5", strcode5);
             *
             *
             * cmd.Parameters.AddWithValue("@upFileName", dbFileName);
             * cmd.Parameters.AddWithValue("@upFileName2", dbFileName2);
             * cmd.Parameters.AddWithValue("@upFileName3", dbFileName3);
             * cmd.Parameters.AddWithValue("@upFileName4", dbFileName4);
             * cmd.Parameters.AddWithValue("@upFileName5", dbFileName5);
             *
             *
             *
             * cmd.Parameters.AddWithValue("@ps", strps);
             * cmd.Parameters.AddWithValue("@ts1", strts1);
             * cmd.Parameters.AddWithValue("@ts2", strts2);
             * cmd.Parameters.AddWithValue("@ts3", strts3);
             * cmd.Parameters.AddWithValue("@ts4", strts4);
             * cmd.Parameters.AddWithValue("@ts5", strts5);
             *
             * cmd.Parameters.AddWithValue("@cs1", strcs1);
             * cmd.Parameters.AddWithValue("@cs2", strcs2);
             * cmd.Parameters.AddWithValue("@cs3", strcs3);
             * cmd.Parameters.AddWithValue("@cs4", strcs4);
             * cmd.Parameters.AddWithValue("@cs5", strcs5);
             *
             *
             * cmd.Parameters.AddWithValue("@link1", strlink1);
             * cmd.Parameters.AddWithValue("@link2", strlink2);
             * cmd.Parameters.AddWithValue("@link3", strlink3);
             * cmd.Parameters.AddWithValue("@link4", strlink4);
             * cmd.Parameters.AddWithValue("@link5", strlink5);
             *
             * cmd.Parameters.AddWithValue("@Dead1", strDead1);
             * cmd.Parameters.AddWithValue("@Dead2", strDead2);
             * cmd.Parameters.AddWithValue("@Dead3", strDead3);
             * cmd.Parameters.AddWithValue("@Dead4", strDead4);
             * cmd.Parameters.AddWithValue("@Dead5", strDead5);
             *
             * cmd.Parameters.AddWithValue("@Progress1", strProgress1);
             * cmd.Parameters.AddWithValue("@Progress2", strProgress2);
             * cmd.Parameters.AddWithValue("@Progress3", strProgress3);
             * cmd.Parameters.AddWithValue("@Progress4", strProgress4);
             * cmd.Parameters.AddWithValue("@Progress5", strProgress5);
             *
             * cmd.Parameters.AddWithValue("@corp1", strcorp1);
             * cmd.Parameters.AddWithValue("@corp2", strcorp2);
             * cmd.Parameters.AddWithValue("@corp3", strcorp3);
             * cmd.Parameters.AddWithValue("@corp4", strcorp4);
             * cmd.Parameters.AddWithValue("@corp5", strcorp5);
             *
             * con.Open();
             *               cmd.ExecuteNonQuery();
             *               con.Close();
             *           }
             */

            //[4]
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[5]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }
    //수정
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //[1]제목과 내용 변수
        string strTitle   = "";
        string strContent = "";
        string strps      = "";
        string strcode1   = "";
        string strts1     = "";
        string strcs1     = "";
        string strlink1   = "";
        string strDead1   = "";
        string strlang1   = "";
        string strcorp1   = "";
        string strsec1    = "";
        string strtech1   = "";
        string strts02    = "";
        string strts03    = "";
        string strts04    = "";
        string strts05    = "";
        string strcs2     = "";
        string strcs3     = "";
        string strcs4     = "";
        string strcs5     = "";
        string strqty1    = "";
        string strqty2    = "";
        string strqty3    = "";
        string strqty4    = "";
        string strqty5    = "";
        string strprice1  = "";
        string strprice2  = "";
        string strprice3  = "";
        string strprice4  = "";
        string strprice5  = "";
        string strvos1    = "";
        string strvos2    = "";
        string strvos3    = "";
        string strvos4    = "";
        string strvos5    = "";
        string strvat1    = "";
        string strvat2    = "";
        string strvat3    = "";
        string strvat4    = "";
        string strvat5    = "";



        string UpfileName = "";
        string dbFileName = lblFileName.Text;



        //[1-1]script
        string strAlert = @"<script>alert('수정했습니다.');location.href='SCM_NoticeView.aspx?SCM_NoticeID="
                          + Request["SCM_NoticeID"]
                          + "';</script>";


        if ((FileUpload1.PostedFile.FileName != null) && (FileUpload1.PostedFile.ContentLength > 0))
        {
            UpfileName = FileUpload1.PostedFile.FileName;

            string SaveLocation = Server.MapPath("~\\fileUpload\\notice\\") + UpfileName;
            dbFileName = UpfileName;
            FileInfo fInfo = new FileInfo(SaveLocation);

            string newUpFile = string.Empty;

            if (!fInfo.Exists)
            {
                int    fIndex     = 0;
                string fExtension = fInfo.Extension;
                string fRealName  = UpfileName.Replace(fExtension, "");

                do
                {
                    fIndex++;
                    dbFileName   = fRealName + "" + fIndex.ToString() + fExtension;
                    SaveLocation = Server.MapPath("~\\fileUpload\\notice\\") + dbFileName;
                    fInfo        = new FileInfo(SaveLocation);
                } while (fInfo.Exists);
            }

            FileUpload1.SaveAs(SaveLocation);
        }


        try
        {
            //[2]리플레이스 변환
            strTitle   = txtTitle.Text;
            strContent = txtContent.Text
                         .Replace("\r\n", "<br />");
            strps  = txtps.Text;
            strts1 = txtts1.Text;
            strcs1 = txtcs1.Text;

            strDead1 = txtDead1.Text;

            strcode1 = txtcode1.Text;
            strlang1 = txtlang1.Text;


            strts02   = txtts02.Text;
            strts03   = txtts03.Text;
            strts04   = txtts04.Text;
            strts05   = txtts05.Text;
            strcs2    = txtcs2.Text;
            strcs3    = txtcs3.Text;
            strcs4    = txtcs4.Text;
            strcs5    = txtcs5.Text;
            strqty1   = txtqty1.Text;
            strqty2   = txtqty2.Text;
            strqty3   = txtqty3.Text;
            strqty4   = txtqty4.Text;
            strqty5   = txtqty5.Text;
            strprice1 = txtprice1.Text;
            strprice2 = txtprice2.Text;
            strprice3 = txtprice3.Text;
            strprice4 = txtprice4.Text;
            strprice5 = txtprice5.Text;
            strvos1   = txtvos1.Text;
            strvos2   = txtvos2.Text;
            strvos3   = txtvos3.Text;
            strvos4   = txtvos4.Text;
            strvos5   = txtvos5.Text;
            strvat1   = txtvat1.Text;
            strvat2   = txtvat2.Text;
            strvat3   = txtvat3.Text;
            strvat4   = txtvat4.Text;
            strvat5   = txtvat5.Text;



            using (Is.Notice.Bsl.Notice_RTx bsl = new Is.Notice.Bsl.Notice_RTx())
            {
                //[1]Excute

                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ISDB"].ConnectionString);
                SqlCommand    cmd = new SqlCommand("UP_ModifySCM_Order", con);
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.AddWithValue("@Title", strTitle);
                cmd.Parameters.AddWithValue("@Content", strContent);
                cmd.Parameters.AddWithValue("@code1", strcode1);
                cmd.Parameters.AddWithValue("@upFileName", dbFileName);
                cmd.Parameters.AddWithValue("@ps", strps);
                cmd.Parameters.AddWithValue("@lang1", strlang1);
                cmd.Parameters.AddWithValue("@ts1", strts1);
                cmd.Parameters.AddWithValue("@cs1", strcs1);
                cmd.Parameters.AddWithValue("@link1", strlink1);
                cmd.Parameters.AddWithValue("@Dead1", strDead1);
                cmd.Parameters.AddWithValue("@corp1", strcorp1);
                cmd.Parameters.AddWithValue("@sec1", strsec1);
                cmd.Parameters.AddWithValue("@tech1", strtech1);
                cmd.Parameters.AddWithValue("@ts02", strts02);
                cmd.Parameters.AddWithValue("@ts03", strts03);
                cmd.Parameters.AddWithValue("@ts04", strts04);
                cmd.Parameters.AddWithValue("@ts05", strts05);
                cmd.Parameters.AddWithValue("@cs2", strcs2);
                cmd.Parameters.AddWithValue("@cs3", strcs3);
                cmd.Parameters.AddWithValue("@cs4", strcs4);
                cmd.Parameters.AddWithValue("@cs5", strcs5);
                cmd.Parameters.AddWithValue("@qty1", strqty1);
                cmd.Parameters.AddWithValue("@qty2", strqty2);
                cmd.Parameters.AddWithValue("@qty3", strqty3);
                cmd.Parameters.AddWithValue("@qty4", strqty4);
                cmd.Parameters.AddWithValue("@qty5", strqty5);
                cmd.Parameters.AddWithValue("@price1", strprice1);
                cmd.Parameters.AddWithValue("@price2", strprice2);
                cmd.Parameters.AddWithValue("@price3", strprice3);
                cmd.Parameters.AddWithValue("@price4", strprice4);
                cmd.Parameters.AddWithValue("@price5", strprice5);
                cmd.Parameters.AddWithValue("@vos1", strvos1);
                cmd.Parameters.AddWithValue("@vos2", strvos2);
                cmd.Parameters.AddWithValue("@vos3", strvos3);
                cmd.Parameters.AddWithValue("@vos4", strvos4);
                cmd.Parameters.AddWithValue("@vos5", strvos5);
                cmd.Parameters.AddWithValue("@vat1", strvat1);
                cmd.Parameters.AddWithValue("@vat2", strvat2);
                cmd.Parameters.AddWithValue("@vat3", strvat3);
                cmd.Parameters.AddWithValue("@vat4", strvat4);
                cmd.Parameters.AddWithValue("@vat5", strvat5);


                cmd.Parameters.AddWithValue("@SCM_NoticeID", Convert.ToInt32(Request["SCM_NoticeID"]));

                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }

            //[2]리디렉트..수차후수정
            Response.Write(strAlert);
        }
        catch (Exception err)
        {
            //[3]Exception
            Response.Write(err.Source + " : " + err.Message);
        }
    }