예제 #1
0
    protected void Btnsave_Click(object sender, System.EventArgs e)
    {
        try
        {
            SqlConnection conn = new SqlConnection(DbSmartCode.x);

            SqlCommand Syscmd = new SqlCommand();
            Syscmd.CommandType = CommandType.StoredProcedure;
            Syscmd.CommandText = "Sp_Export_Data";

            DateTime shipDate = DateTime.ParseExact(txtentdt.Text, "d", null);
            Syscmd.Parameters.AddWithValue("@sp_Date", shipDate);
            Syscmd.Parameters.AddWithValue("@sp_StyleID", GetStyle.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_POLot", GetPo.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_ColorID", GetColor.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_CompanyID", GetFactory.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_Size", GetSize.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_SizeQty", int.Parse(txtShipQty.Text.Trim()));
            Syscmd.Parameters.AddWithValue("@sp_User", this.Session["Username"].ToString());
            Syscmd.Parameters.AddWithValue("@sp_Fob", decimal.Parse(txtFob.Text.Trim()));

            Syscmd.Connection = conn;
            conn.Open();

            Syscmd.ExecuteNonQuery();
            conn.Close();
        }
        catch (Exception ex)
        {
        }

        GetSize.ClearSelection();
        txtShipQty.Text = string.Empty;
    }
예제 #2
0
    protected void Btnsave_Click(object sender, System.EventArgs e)
    {
        try
        {
            SqlConnection conn = new SqlConnection(DbSmartCode.x);

            SqlCommand Syscmd = new SqlCommand();
            Syscmd.CommandType = CommandType.StoredProcedure;
            Syscmd.CommandText = "Sp_Shipment_Data";

            DateTime shipDate = DateTime.ParseExact(txtentdt.Text, "d", null);
            Syscmd.Parameters.AddWithValue("@sp_Date", shipDate);
            //string line = drpLine.SelectedValue.ToString();
            //Syscmd.Parameters.AddWithValue("@line_no", line);
            //Syscmd.Parameters.AddWithValue("@ord_no", txtOrder.Text.Trim());
            Syscmd.Parameters.AddWithValue("@sp_StyleID", GetStyle.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_POLot", GetPo.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_ColorID", GetColor.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_CompanyID", GetFactory.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_Size", GetSize.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_SizeQty", int.Parse(txtShipQty.Text.Trim()));
            Syscmd.Parameters.AddWithValue("@sp_User", this.Session["Username"].ToString());

            //Syscmd.Parameters.AddWithValue("@ord_buyer", txtBuyer.Text.Trim());
            //Syscmd.Parameters.AddWithValue("@target_hr", int.Parse(txtTargerHr.Text.Trim()));
            //Syscmd.Parameters.AddWithValue("@target_dy", int.Parse(txtTargetDy.Text.Trim()));
            //Syscmd.Parameters.AddWithValue("@ord_factory", txtOrdFactory.Text.Trim());

            //Syscmd.Parameters.AddWithValue("@plan_hr", int.Parse(txtPlanHr.Text.Trim()));
            //int size = int.Parse(drpHour.SelectedValue.ToString());
            //Syscmd.Parameters.AddWithValue("@prodHr", prodHr);
            //int hrValue = int.Parse(txtHour.Text.Trim());
            //Syscmd.Parameters.AddWithValue("@hrValue", hrValue);

            Syscmd.Connection = conn;
            conn.Open();

            Syscmd.ExecuteNonQuery();
            conn.Close();
        }
        catch (Exception ex)
        {
        }

        GetSize.ClearSelection();
        txtShipQty.Text = string.Empty;
        //Response.Redirect(Request.RawUrl); //page refreash
    }