Save to a MySQL database a temporary row with all information about a receipt
With this code:


string items = "";
 for (int i = 0; i &lt; _ProductsGrid.Rows.Count; i++)
 {
     items += _ProductsGrid.Rows[i].Cells[1].Value.ToString();
     items += ",";
 }

items = items.Remove(items.Length - 1, 1);



You're concatenating a list of values into a string. Let me first say a word about that try/catch. Exceptions are exceptional conditions, if you can avoid an exception then you should:

if (items.Length &gt; 1)
    items = items.Remove(items.Length - 1, 1);


However you do not need it, both items and Qnt can be created with like this (assuming _ProductsGrid is a DataGrid but same logic applies in any case):

var rows = _ProductsGrid.Rows.Cast&lt;DataRow&gt;();
string items String.Join(";",
    rows.Select(x =&gt; Convert.ToString(x.Cells[1].Value)));




Now let's see you SQL. You're building SQL commands into strings, it makes your code hard to debug, open to SQL injection attacks and fragile because invalid and unexpected user inputs will crash the application. Use SQL parameters:

string query = "SELECT * FROM TempSave WHERE Localization=@Localization";


Now you have to build the command:

using (var cmd = new MySqlCommand(query, connection))
{
    cmd.Parameters.AddWithValue("@Localization", _Save.Localization);

    // ...
}


And you have the reader:

using (var reader = cmd.ExecuteReader())
{
    // ...
}


Note that using parameters also the string concatenation will go away (because you can dynamically create named parameters as @param1, @param2 and so on).



You do not need to call MySqlConnection.Close() if (correctly!) you're already wrapped the object inside a using statement.



Please follow usual C# naming guidelines, they will make your code easier to read for everyone (for example local variables should be camelCase). Stick to one convention and follow it (to have items and Qnt is confusing, why they have different casing?)

Also try to use meaningful names for your variables. Code should be a fluent sentence to read like a book.



Catch exceptions. Things may go wrong and you do not want to crash entire application.



Validate user input. What if user didn't enter anything in one of your input boxes?



Split code into separate methods, it helps because to understand whole logic you need to read just few lines, not the entire code. Think (names are weird because I do not know your domain but you must do better):

if (CheackTemDataAlreadyExists())
    DeleteCheackTemData();

InsertCheackTemData();


Note that  you should avoid code duplication (INSERT was repeated twice).



Do not hard-code constants (like connection string). Ideally it should be in your configuration file but, at least, move it to a private const string field.