Exemplo n.º 1
0
    public void insert(Add_stateBLL objectBLL)
    {
        try
        {
            int        var = 0;
            SqlCommand cmd = new SqlCommand("add_state", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@country", objectBLL.Country);
            cmd.Parameters.AddWithValue("@state_name", objectBLL.State_name);



            con.Open();

            var = cmd.ExecuteNonQuery();
            if (var > 0)
            {
                objectBLL.Status = true;
            }
        }
        catch (Exception ex)
        {
            String msg = ex.Message;
        }
        finally
        {
            con.Close();
            con.Dispose();
        }
    }
Exemplo n.º 2
0
 public void insert(Add_stateBLL objectBLL)
 {
     objectDLL.insert(objectBLL);
 }